microsoft / microsoft/vscode-mock-debug
Mock debug adapter sends stop event before response to step request in violation of the spec
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 358
- Forks
- 200
- Avg merge
- 24d 23h
- Merged PRs (30d)
- 1
Description
The DAP specification (https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Next) states the following about all the step requests (next, stepIn, stepOut, stepBack):
The debug adapter first sends the response and then a stopped event (with reason step) after the step has completed.
The mock debug adapter appears to do this in reverse, violating the spec.
Looking at https://github.com/microsoft/vscode-mock-debug/blob/main/src/mockDebug.ts#L511-L539, it appears that the runtime step method (which indirectly, but as far as I can tell synchronously, sends the stop event) is called before sending a response to the step request.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/mockDebug.ts around lines 511-539 and trace the step request through the runtime step method and response handling. Verify the ordering for next, stepIn, stepOut, and stepBack against the DAP specification; done means the response is sent before the stopped event for each step request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100