Defer DAP capabilities and InitializedEvent until after adapter connects#328
Draft
Defer DAP capabilities and InitializedEvent until after adapter connects#328
Conversation
- Move InitializedEvent from initializeRequest to launchRequest, sent after the roku adapter connects so VS Code's configuration phase (setBreakpoints, setExceptionBreakpoints, configurationDone) happens with a live connection - Move post-configuration work (sg commands, publish, activate, deep link) into configurationDoneRequest so it runs after VS Code has finished sending breakpoint config - Send a CapabilitiesEvent just before InitializedEvent to advertise adapter-specific capabilities: supportsLogPoints only for telnet, and exception breakpoint support conditional on rokuAdapter.supportsExceptionBreakpoints - Remove supportsStepBack = false (default) and stale comments Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… events - Move sendResponse(response) to after the adapter connects and CapabilitiesEvent is sent, so VS Code's onDidStartDebugSession fires with a fully connected adapter - Add launch progress events: 'Finding device on network', 'Packaging Project(s)', 'Connecting to debug server', 'Configuring breakpoints' - Wrap all launchRequest setup in a single try/catch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
InitializedEventfrominitializeRequesttolaunchRequest, sent after the Roku adapter connects — so VS Code's configuration phase (setBreakpoints,setExceptionBreakpoints,configurationDone) happens with a live connectionconfigurationDoneRequestso it runs only after VS Code has finished sending breakpoint configCapabilitiesEventjust beforeInitializedEventto advertise adapter-specific capabilities:supportsLogPointsonly for telnet (not debug protocol)supportsExceptionFilterOptions,supportsExceptionOptions,exceptionBreakpointFilters) conditional onrokuAdapter.supportsExceptionBreakpointssupportsStepBack = false(redundant default) and stale commentsTest plan
configurationDonetriggers the publish/activate flow as expected🤖 Generated with Claude Code