-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use DAP's 'startDebugging' request #1388
Comments
Depends in part on microsoft/vscode#160169 for testing |
I started this on the |
will you continue work on it when you get more time, @connor4312, or is it discontinued for now? I would love to use it when available! |
@filipdutescu I'm sure @connor4312 would appreciate feedback on the dap-server branch he pushed. Maybe try hooking it up to your editor and see if it works? |
I've implemented this in the linked PR. Releases will have the DAP server included, see the .tar.gz in https://github.com/microsoft/vscode-js-debug/releases/tag/v1.77.0 for an example The server can be run by extracting the archive and then running
It can also be built into the |
Could you elaborate on what a client has to do to use it? Starting the debug adapter via
Starting another instance of How is the client supposed to use the configuration?
|
Currently the assumption is that the client will connect back to the same debug process instead of launching a new one. But I think I will also support if a client does launch a new DAP instance, as that is a reasonable interpretation of the DAP specification. |
How can it connect back to the same debug process? That doesn't work if the client is implemented in a different runtime and running as a separate process.
As mentioned I tried that and it didn't work. The client receives no response to the |
The DAP server listens on either a port or socket/pipe. A client can make a new connection to the same port or socket/pipe.
That's why I used future tense and reopened this issue 🙂 |
Oh right, thanks for the pointer. I managed to get it working. (For others following this issue, here's the configuration: https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#vscode-js-debug) |
You guys rock! |
Does anyone have an example of using dapDebugServer as debugger, VSCode as editor or another editor as client? I've tried VSCode as editor, connected to dapDebugServer, but I can't debug in VSCode. The following is the launch.json configuration
|
Is it intentional that there is no dap release for 1.77.1 and 1.77.2 ? |
Yea, technically this will only land in 1.78.0. 1.77.x are recovery releases off 1.77.0 that didn't have them. I made a special build for 1.77.0 so people can start trying it out. |
OK great, thanks. Is here the best place to provide feedback? I'm testing it with vimspector this week. Initial feedback is that I have got it to "work" but simply stepping through a trivial file is extremely slow. Stepping takes like 0.5s (compared to say 0.1s for the legacy vscode-node-debug2 on the same file). It's entirely possible that's on my side, but I don't see similar problems with other multi-session servers (like debugpy). It looks to me like it's the stackTrace request, which takes about 500ms: Example:
Compared with the old adapter (same file)
As you can see, the timestamps in the first request show ~500ms vs in the 2nd request ~3ms |
FYI for DAP server users: in #1789 I added DWARF debugging support, but this is not included out of the box since the component needed to enable DWARF debugging is ~8x larger than js-debug itself. If you want to enable this for the DAP server, you will want to install the |
In order to make js-debug easier to use in other DAP clients, we should try to move VS Code specific "integration particularities" (typically extension code), into the debug adapter itself.
Using the new
startDebugging
reverse request should make this easier.For details see: microsoft/debug-adapter-protocol#79
The text was updated successfully, but these errors were encountered: