cmux-debug-windows

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cmux Debug Windows

cmux 调试窗口

Keep this workflow focused on existing debug windows and menu entries. Do not add a new utility/debug control window unless the user asks explicitly.
本工作流仅针对现有调试窗口和菜单项。除非用户明确要求,否则不要新增工具/调试控制窗口。

Workflow

工作流程

  1. Verify debug menu wiring in
    Sources/cmuxApp.swift
    under
    CommandMenu("Debug")
    .
    • Menu path in app:
      Debug
      Debug Windows
      → window entry.
    • The
      Debug
      menu only exists in DEBUG builds (
      ./scripts/reload.sh --tag ...
      ).
    • Release builds (
      reloadp.sh
      ,
      reloads.sh
      ) do not show this menu.
  2. Keep these actions available in
    Menu("Debug Windows")
    :
  • Sidebar Debug…
  • Background Debug…
  • Menu Bar Extra Debug…
  • Open All Debug Windows
  1. Reuse existing per-window copy buttons (
    Copy Config
    ) in each debug window before adding new UI.
  2. For one combined payload, run:
bash
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh --copy
  1. After code edits, run build + tagged reload:
bash
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build
./scripts/reload.sh --tag <tag>
  1. 验证
    Sources/cmuxApp.swift
    CommandMenu("Debug")
    下的调试菜单关联。
    • 应用内菜单路径:
      Debug
      Debug Windows
      → 窗口项。
    • Debug
      菜单仅在DEBUG构建版本中存在(执行
      ./scripts/reload.sh --tag ...
      生成)。
    • Release构建版本(执行
      reloadp.sh
      reloads.sh
      生成)不会显示该菜单。
  2. 确保
    Menu("Debug Windows")
    中保留以下操作选项:
  • Sidebar Debug…
  • Background Debug…
  • Menu Bar Extra Debug…
  • Open All Debug Windows
  1. 在新增UI之前,复用每个调试窗口中已有的窗口专属复制按钮(
    Copy Config
    )。
  2. 如需生成组合配置包,执行以下命令:
bash
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh --copy
  1. 代码编辑完成后,执行构建+带标签重载:
bash
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build
./scripts/reload.sh --tag <tag>

Key Files

关键文件

  • Sources/cmuxApp.swift
    : Debug menu entries and debug window controllers/views.
  • Sources/AppDelegate.swift
    : Menu bar extra debug settings payload and defaults keys.
  • Sources/cmuxApp.swift
    :包含Debug菜单项及调试窗口控制器/视图。
  • Sources/AppDelegate.swift
    :包含菜单栏额外调试设置配置包及默认键值。

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:
bash
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh --copy
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh --domain <bundle-id> --copy
  • scripts/debug_windows_snapshot.sh
    用途:
  • 读取当前与调试相关的默认值。
  • 打印sidebar/background/menu bar extra的组合配置快照。
  • 可选将快照复制到剪贴板。
示例:
bash
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh --copy
skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh --domain <bundle-id> --copy