Skip to content
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

[Feature Request]: Switch to vscode-js-debug #249

Closed
puremourning opened this issue Sep 3, 2020 · 9 comments · Fixed by #748
Closed

[Feature Request]: Switch to vscode-js-debug #249

puremourning opened this issue Sep 3, 2020 · 9 comments · Fixed by #748
Labels
Server support A debug server exists, test that it works, and document it Severity 2 The plugin or a workflow is inconvenient or occasionally broken

Comments

@puremourning
Copy link
Owner

Looks like vsode-node-debug and vscode-chrome-debug are being deprecated.

https://github.com/microsoft/vscode-js-debug

seems to be the replacement. it has a ton of stuff in it, but it all looks quite out-of-band and may work worse for us in the end.

discovered while trying to report a bug in vscode-chrome-debug.

@puremourning puremourning added the Server support A debug server exists, test that it works, and document it label Oct 9, 2020
@csy19960309
Copy link

csy19960309 commented Dec 20, 2020

In the use of vscode-node-debug2, the breakpoint never works even if is says ' Debugger attached '.
However, the breakpoint works well when I switch to Visual Studio Code with nothing else changed. I do not know if it is because Visual Studio Code uses vscode-js-debug instead of vscode-node-debug2.

@mfussenegger
Copy link

The issue here may also be interesting to you.

@puremourning
Copy link
Owner Author

Thanks. I took another look at this other debug adapter and I could not work out how to drive it. Vscode-node-devug2 works well enough for now. I see they are using custom undocumented protocol extensions so I’m NOPE for now on that 👍

same for you in nvim-dap I guess?

@Trim
Copy link

Trim commented Apr 5, 2023

FYI, vscode-js-debug has released a pure DAP server (so, using the new 'startDebugging' feature): microsoft/vscode-js-debug#1388 (comment)

If I understood correctly, the pure DAP server is inside this asset from the v1.77.0:

https://github.com/microsoft/vscode-js-debug/releases/download/v1.77.0/js-debug-dap-v1.77.0.tar.gz

I've seen the vimpsector multpile-sessios branch with a python dap gadget example, maybe we could add vscode-js-debug too with this new release?

@puremourning
Copy link
Owner Author

the implementation in that branch is really experimental. The user experience is really terrible (having a tab-per-instance is very messy). I haven't actually worked out a good way to handle multiple sessions yet , which is sad. I'll push it up to the top of the "list".

@puremourning puremourning added the Severity 2 The plugin or a workflow is inconvenient or occasionally broken label Apr 5, 2023
@puremourning
Copy link
Owner Author

@Trim I have updated the multiple-sessios branch to support the new startDebugging request and switch to vscode-js-debug. You can :VimspectorInstall vscode-js-debug and it will work with the sample project in support/test/node/simple.

However, as I said the UX is not really very good with this multiple tabs things. I need to do a lot of refactoring to make the UI/UX good. But feel free to try it.

puremourning added a commit that referenced this issue Apr 11, 2023
@puremourning
Copy link
Owner Author

I've also pushed a 'multiple-sessions-v2' branch which does away with the UI tab and works a bit more intuitively, but is likely to be Incredibly buggy as it's a total hack.

@ericdvb
Copy link

ericdvb commented Jun 1, 2023

As of now, does debugging an external process (using "request": "attach") work? I'm trying to debug a next.js project but I can't get vscode-js-debug to attach to the node process. With vscode-node-debug2, it'll attach, but the process never stops on toggled breakpoints (although it will stop on exceptions, I supposed I could just use break or something).

@puremourning
Copy link
Owner Author

Yes it works so far as I know. There's even an example in the support/test directory.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Server support A debug server exists, test that it works, and document it Severity 2 The plugin or a workflow is inconvenient or occasionally broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants