microsoft / microsoft/vscode-js-debug

`disconnect` request does not terminate the adapter process when running standalone

Open
#2,383 0 comments 0 reactions 1 assignee View on GitHub

@connor4312 is already working on this.

Since Jul 1, 2026.

bug
Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

Describe the bug
When running vscode-js-debug as a standalone DAP adapter (outside of vscode), the adapter remains alive after successfully handling a disconnect request.

According to the Debug Adapter Protocol specification:
The disconnect request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).

I'm not sure whether this is an intentional choice or a bug.

To Reproduce
Steps to reproduce the behavior:

  1. Start vscode-js-debug: node dapDebugServer.js PORT.
  2. Establish a debug session.
  3. Send disconnect request.
  4. Wait for the successful response.
  5. The connection is closed but the adapter remains alive.

Additional context
I use my own DAP client.
The same disconnect workflow causes the adapter to exit when using the Java Debug Adapter and debugpy-adapter for Python, which is why I expected the same behavior from vscode-js-debug.

Could you clarify whether this behavior is intentional when running the adapter in standalone ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.