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

How to consume Debug Adapter / debugServerMain.ts outside of VSCode? #926

Closed
mickaelistria opened this issue Feb 18, 2021 · 14 comments
Closed
Labels
*duplicate Issue identified as a duplicate of another issue(s) *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@mickaelistria
Copy link

I'm willing to replace the usage of node-debug & node-debug2 modules in Eclipse Wild Web Developer by the newer js-debug module.
However, I didn't find out how to actually start the debug adapter. For node-debug, I could "extract" the module from VSCode, import it in Wild Web Developer and then run node node-debug2/out/src/nodeDebug.js to start the debug adapter and talk DAP with it; but with js-debug, I don't know what would be a similar entry point. I tried node ms-vscode.js-debug/src/extension.js but this requires VSCode running apparently. I found the very interesting debugServerMain.ts class but don't find it in the final distribution in VSCode.
Is there another command I should try? Or is the debugServerMain just removed in the distribution (so I should build vscode-js-debug myself) ?

@connor4312
Copy link
Member

This thread should provide you some pointers: #902

Also related (to making it easier to consume) microsoft/vscode#116730

@connor4312 connor4312 added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Feb 18, 2021
@mickaelistria
Copy link
Author

Thanks.
So do I get it right that currently, the vscode-js-debug adapter needs to be built locally in order to be used out of VSCode? There is no "ready-to-go" distribution? (cc @pretentious7)

@connor4312
Copy link
Member

That's right. What would your ideal 'ready to go' distribution look like? An npm package?

@mickaelistria
Copy link
Author

Yes, a npm package would be great.

@pretentious7
Copy link

pretentious7 commented Feb 18, 2021

That's right. What would your ideal 'ready to go' distribution look like? An npm package?

Yes please, this would be ideal, linking to within .vscode after a bunch of confusing steps is not great.

Indeed, better docs and a more straightforward way to go about consuming it outside would be nice (like, straightforward run file -> input json thing in STDIO -> debugger response in STDOUT).I don't think it's really reasonable to expect editor devs to read and understand the structure of the dap adapter in order to correctly use it.

Of course I understand that the primary point of the exercise for you guys is to support vs-code's capabilities, but the more users the better, right? :)

@mickaelistria
Copy link
Author

About going to npm.js, although it would be awesome, it IMO has to be done properly (defining upstream and downstream dependency relationships, with LS being as downstream as possible). If not done properly, the module may face same issue as microsoft/vscode#117013 and can become too easily out-of-date and less useful than expected.

@connor4312
Copy link
Member

js-debug is pretty standalone and ships (in an extension) as a set of standalone webpacked js files

@mickaelistria
Copy link
Author

Any news here? Is there a standalone npm package for the debug adapter? If not, any ETA? Thanks in advance!

@vominhtien300991

This comment has been minimized.

@vominhtien300991

This comment has been minimized.

@MAST1999

This comment was marked as duplicate.

@zulus
Copy link

zulus commented Sep 29, 2023

I found interesting task in gulp: dapDebugServer

Is this possible to release package for example @vscode/js-debug-dap-server, same for flatSessionBundle and/or vsDebugServerBundle ?

@connor4312
Copy link
Member

Forgot to duplicate this into #1388

We now publish a compliant pure-DAP server that works for clients that support the startDebugging request. This is in the assets in each release on Github as js-debug-dap-<version>.tar.gz https://github.com/microsoft/vscode-js-debug/releases

@connor4312 connor4312 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2023
@connor4312 connor4312 added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 30, 2023
@mickaelistria
Copy link
Author

Thank you very much for pointing to this assert @connor4312 , it's exactly what was needed and I'm happy to report we're already successfully adopting it for Eclipse Wild Web Developer as a replacement to node-debug2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s) *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

6 participants