Something went wrong. Try again.
experiments in a post-browser web
Something went wrong. Try again.
Shell
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273#!/bin/bash# Debug packaged app - runs the installed app with DEBUG output# Usage: ./scripts/debug-packaged.sh [--visible] [--profile NAME] [duration_seconds]# Example: ./scripts/debug-packaged.sh # 10 seconds, default profile# Example: ./scripts/debug-packaged.sh --visible # 10 seconds, show UI# Example: ./scripts/debug-packaged.sh --profile test # fresh test profile# Example: ./scripts/debug-packaged.sh --visible --profile test 20
VISIBLE=0PROFILE=""
while [[ "$1" == --* ]]; do case "$1" in --visible) VISIBLE=1 shift ;; --profile) PROFILE="$2" shift 2 ;; *) echo "Unknown option: $1" exit 1 ;; esacdone
DURATION=${1:-10}LOGFILE="/tmp/peek-packaged-debug.log"
cleanup() { pkill -f "/Applications/Peek.app" 2>/dev/null || true}
trap cleanup EXIT
# Kill any existing instances firstpkill -f "/Applications/Peek.app" 2>/dev/null || truesleep 1
if [ -n "$PROFILE" ]; then echo "Running packaged Peek.app with DEBUG for ${DURATION}s (profile: $PROFILE)..."else echo "Running packaged Peek.app with DEBUG for ${DURATION}s (default profile)..."fiecho "Log file: $LOGFILE"echo ""
if [ -n "$PROFILE" ]; then PROFILE="$PROFILE" DEBUG=1 /Applications/Peek.app/Contents/MacOS/Peek > "$LOGFILE" 2>&1 &else DEBUG=1 /Applications/Peek.app/Contents/MacOS/Peek > "$LOGFILE" 2>&1 &fiPID=$!
sleep "$DURATION"
echo "=== Extension manifest loading ==="grep -E "\[ext:win\].*Creating window" "$LOGFILE" || echo "(no extension window creation found)"echo ""
echo "=== Manifest details ==="grep -E "manifest:" "$LOGFILE" | head -20 || echo "(no manifest details found)"echo ""
echo "=== Errors ==="grep -iE "error|failed|cannot" "$LOGFILE" | head -20 || echo "(no errors found)"echo ""
echo "=== Full log available at: $LOGFILE ==="echo "View with: cat $LOGFILE"