Skip to content

Add CLI debugging interface with interactive REPL and full launch config support#345

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/support-cli-debugging
Draft

Add CLI debugging interface with interactive REPL and full launch config support#345
Copilot wants to merge 4 commits into
masterfrom
copilot/support-cli-debugging

Conversation

Copilot AI commented May 15, 2026

Copy link
Copy Markdown
Contributor
  • Explore existing CliDebugger and understand current state
  • Add pending-request callback map for async DAP response dispatch
  • Track currentThreadId and currentFrameId from stopped events
  • Auto-fetch stackTrace on stop and display current file/line
  • Add vars command (scopes → variables waterfall with Name/Type/Value table)
  • Add bt command (call stack display)
  • Add expand <ref> command to drill into nested objects/arrays
  • Update printHelp with new commands
  • Add 10 unit tests for new variable inspection logic
  • Lint — passes clean
  • All 24 tests passing
  • CodeQL — 0 alerts

Copilot AI linked an issue May 15, 2026 that may be closed by this pull request
- Update cli.ts to expose all key LaunchConfiguration options as CLI flags
  (--host, --password, --root-dir, --enable-debug-protocol, --stop-on-entry,
  port options, --log-level, etc.)
- Add CliDebugger class that starts BrightScriptDebugSession as an in-process
  TCP server, connects via a minimal DAP client, and provides an interactive
  REPL (continue, next, step, stepout, pause, eval, help, quit)
- Add DapMessageParser and formatDapMessage utilities for Content-Length framed
  DAP message encoding/decoding
- Update cli.spec.ts with tests for new CLI options and DAP message utilities

Agent-Logs-Url: https://github.com/rokucommunity/roku-debug/sessions/00286ab8-d2bd-4266-97f1-2025f0c10f24

Co-authored-by: chrisdp <9591618+chrisdp@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CLI debugging support using yargs module Add CLI debugging interface with interactive REPL and full launch config support May 16, 2026
Copilot AI requested a review from chrisdp May 16, 2026 00:02
- Add pendingRequests Map for correlating async DAP responses with callbacks
- Track currentThreadId / currentFrameId; auto-fetch stackTrace on stop
  and display current file:line location in terminal
- Add vars/variables/v command: fetches DAP scopes then variables for each
  scope and prints a formatted Name/Type/Value table
- Add bt/backtrace/stack command: shows call stack with frame numbers
- Add expand/ex <ref> command: drills into nested objects/arrays by
  variablesReference ID
- Pass currentThreadId and currentFrameId to step/continue/eval commands
- Update printHelp with new commands
- Add 10 new unit tests covering all new functionality

Agent-Logs-Url: https://github.com/rokucommunity/roku-debug/sessions/6fbd7d4f-0b3b-4386-a4fd-d4aa154b0355

Co-authored-by: chrisdp <9591618+chrisdp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support cli debugging

2 participants