name: c11-debug-windows
version: 1
description: Manage c11 debug windows and related debug menu wiring for Sidebar Debug, Background Debug, and Menu Bar Extra Debug. Use this when the user asks to open/tune these debug controls, add or adjust Debug menu entries, or capture/copy a combined debug config snapshot. Applies to the c11 macOS app (binary c11).
c11 Debug Windows
Developer-focused workflow for the c11 macOS app's Debug menu (DEBUG builds only). Covers existing debug windows and menu wiring — do not add a new utility/debug control window unless the user asks explicitly.
Workflow
- Verify debug menu wiring in
Sources/c11App.swiftunderCommandMenu("Debug").- Menu path in app:
Debug→Debug Windows→ window entry. - The
Debugmenu only exists in DEBUG builds (./scripts/reload.sh --tag ...). - Release builds (
reloadp.sh,reloads.sh) do not show this menu.
- Menu path in app:
- Keep these actions available in
Menu("Debug Windows"):
Sidebar Debug…Background Debug…Menu Bar Extra Debug…Open All Debug Windows
- Reuse existing per-window copy buttons (
Copy Config) in each debug window before adding new UI. - For one combined payload, run:
skills/c11-debug-windows/scripts/debug_windows_snapshot.sh --copy
- After code edits, run build + tagged reload:
xcodebuild -project GhosttyTabs.xcodeproj -scheme c11 -configuration Debug -destination 'platform=macOS' build
./scripts/reload.sh --tag <tag>
Key Files
Sources/c11App.swift: Debug menu entries and debug window controllers/views.Sources/AppDelegate.swift: Menu bar extra debug settings payload and defaults keys.
Script
scripts/debug_windows_snapshot.sh
Purpose:
- Reads current debug-related defaults values.
- Prints one combined snapshot for sidebar/background/menu bar extra.
- Optionally copies it to clipboard.
Examples:
skills/c11-debug-windows/scripts/debug_windows_snapshot.sh
skills/c11-debug-windows/scripts/debug_windows_snapshot.sh --copy
skills/c11-debug-windows/scripts/debug_windows_snapshot.sh --domain <bundle-id> --copy