You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched all issues to ensure it has not already been requested.
Summary
Currently, our DAP conversation doesn't follow the spec explicitly in terms of conversation.
What is supposed to happen:
Initialize is sent and server responds, then responds with capabilities
Launch is sent by client after receiving capabilities. should be held and deferred until configurationDone
Server sends initialized event (preferably when ready to receive launch requests)
Client does config after initialized
Configuration is done (breakpoints etc.)
launch request is now responded to after configuration is completed
In actuality, we respond to the launch request immediately before configuration
The spec states:
Once the debug adapter is ready to receive configuration from the client, it sends an initialized event to the client. As described above, the client sends zero or more configuration-related requests before sending a configurationDone request.
After the response to configurationDone is sent, the debug adapter may respond to the launch or attach request, and then the debug session has started.
Proposed Design
We need to hold the launch response until after configurationDone is completed. Fixing this would likely be part of a larger refactor to fix the odd behavior of scripts being started directly within configurationDone handler, rather than configurationDone triggering an event or otherwise to start/release any pending launch messages.
As part of this, because the spec currently does not allow multiplexing requests over a single adapter channel, the launch/attach should singleton and throw an error if any additional launch/attach requests are made until the existing one completes.
Implementation Idea
When a launch task is started, a TaskCompletionSource or otherwise should be started and awaited, and the configurationDone handler will complete that task, enabling the launch task to resume and return its startup response.
The text was updated successfully, but these errors were encountered:
Prerequisites
Summary
Currently, our DAP conversation doesn't follow the spec explicitly in terms of conversation.
What is supposed to happen:
In actuality, we respond to the launch request immediately before configuration
The spec states:
Proposed Design
We need to hold the launch response until after configurationDone is completed. Fixing this would likely be part of a larger refactor to fix the odd behavior of scripts being started directly within configurationDone handler, rather than configurationDone triggering an event or otherwise to start/release any pending launch messages.
As part of this, because the spec currently does not allow multiplexing requests over a single adapter channel, the launch/attach should singleton and throw an error if any additional launch/attach requests are made until the existing one completes.
Implementation Idea
When a launch task is started, a
TaskCompletionSource
or otherwise should be started and awaited, and the configurationDone handler will complete that task, enabling the launch task to resume and return its startup response.The text was updated successfully, but these errors were encountered: