Add CLI debugging interface with interactive REPL and full launch config support#345
Draft
Copilot wants to merge 4 commits into
Draft
Add CLI debugging interface with interactive REPL and full launch config support#345Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
- 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
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
currentThreadIdandcurrentFrameIdfrom stopped eventsvarscommand (scopes → variables waterfall with Name/Type/Value table)btcommand (call stack display)expand <ref>command to drill into nested objects/arraysprintHelpwith new commands