Vscode-js-debug: How to consume Debug Adapter / debugServerMain.ts outside of VSCode?

Created on 18 Feb 2021  ·  10Comments  ·  Source: microsoft/vscode-js-debug

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) ?

*question

Most helpful comment

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

All 10 comments

This thread should provide you some pointers: https://github.com/microsoft/vscode-js-debug/issues/902

Also related (to making it easier to consume) https://github.com/microsoft/vscode/issues/116730

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)

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

Yes, a npm package would be great.

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? :)

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 https://github.com/microsoft/vscode/issues/117013 and can become too easily out-of-date and less useful than expected.

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

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

Tiến Võ minh đã gửi cho bạn một email qua Chế độ bảo mật của Gmail:

[image: Biểu trưng Gmail]Re: [microsoft/vscode-js-debug] How to consume Debug Adapter / debugServerMain.ts outside of VSCode? (#926) https://confidential-mail.google.com/msg/AJd0jO2A6pRrI4Zjp0ydwsU2a98_usX0USi5J0IwvIywTlFkXYVihRr5E3QWcz-5IA_XP6OuUxNzffZ4-kgyvVMimMN_CDK1205XSJGqU6Car8_K8HtkvSJEfVYEitE18Tegh50zKprrZBbfsJcDpdmBlQ4t62XzPsrAbf-ME_9OtroYu9wJC0DeJajs3bk8_Zmz5Wwk5kJ32reb0Rfm16I=

Thư này đã được gửi vào 10 thg 3, 2021 lúc 03:02:15 PST
Bạn có thể mở thư bằng cách nhấp vào liên kết dưới đây. Liên kết này sẽ chỉ hoạt động cho [email protected].

Xem email https://confidential-mail.google.com/msg/AJd0jO2A6pRrI4Zjp0ydwsU2a98_usX0USi5J0IwvIywTlFkXYVihRr5E3QWcz-5IA_XP6OuUxNzffZ4-kgyvVMimMN_CDK1205XSJGqU6Car8_K8HtkvSJEfVYEitE18Tegh50zKprrZBbfsJcDpdmBlQ4t62XzPsrAbf-ME_9OtroYu9wJC0DeJajs3bk8_Zmz5Wwk5kJ32reb0Rfm16I=

Chế độ bảo mật của Gmail cho phép bạn kiểm soát các thư mình gửi nhiều hơn. Người gửi có thể đặt thời gian hết hạn, vô hiệu hoá chức năng in hoặc chuyển tiếp thư hay theo dõi quyền truy cập vào thư. Tìm hiểu thêm https://support.google.com/mail/answer/7674059
Gmail: Email của Google
Việc sử dụng phải tuân theo Chính sách quyền riêng tư của Google https://myaccount.google.com/privacypolicy?hl=vi
Google LLC, 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
Bạn đã nhận được thông báo này vì ai đó đã gửi cho bạn một email qua chế độ bảo mật của Gmail.
[image: Biểu trưng Google]

Your Google verification code is 594816

Was this page helpful?
0 / 5 - 0 ratings

Related issues

auchenberg picture auchenberg  ·  3Comments

jtsom picture jtsom  ·  8Comments

Skuriles picture Skuriles  ·  5Comments

eamodio picture eamodio  ·  5Comments

mgabeler-lee-6rs picture mgabeler-lee-6rs  ·  4Comments