-
Notifications
You must be signed in to change notification settings - Fork 60
Add support for Windows Subsystem Linux - refactored #142
Conversation
Add new "useWSL" launch attribute. When used, Bash on Windows will be used to launch runtimeExecutable. Source files directory mapping will also be automatically added.
|
When will this make it's way into the insiders build? |
|
Are you asking when with the WSL support for this arrive on Windows 10 insiders? If yes, you can use the current retail Windows 10 (creators update) for this or any insiders release since. No recent WSL work was required to support this. |
|
@yodurr I am asking "when can we debug a node app running on WSL from Visual Code". i.e. set a breakpoint in your node code, press F5 and start debugging, but with the process launching inside bash, Currently, you can only attach to a bash node process through a port. It would be nice to launch and go right into debugging. |
|
@yodurr I think @alanosman was referring to the VSCode Insiders. |
|
This is in node-debug ("legacy") but not node-debug2 ("inspector"). @weinand does this PR match what's in node-debug now? |
|
@roblourens yes, this reimplementation of the method that was added to |
|
Thanks for clarifying. Agree @alanosman the scenario you describe is what we're excited about seeing supported. This PR makes it happen. |
|
@yodurr so, just so I am clear, this is not in the insiders build yet, right? |
roblourens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the spelling of the new file (Liunux)
src/nodeDebugAdapter.ts
Outdated
|
|
||
| const port = args.port || utils.random(3000, 50000); | ||
|
|
||
| if (args.useWSL && !wsl.subsystemLinuxPresent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subsystemLinuxPresent is a function
|
Updated |
|
Thanks! I'll publish this and pull it into the vscode build so it's available in the next Insiders build. Then it will be in stable 1.18, the first week in November. |
|
FYI @weinand I took this and found some tweaks in node-debug, and copied your fix from microsoft/vscode-node-debug@3a0f1a8#diff-2a53bfce93d1a0ef575c1c6581a6cb1b. LMK if you can think of anything else I need to change. |
Continued from #126. Refactored like microsoft/vscode-node-debug#158., to add WSL support for
inspectorprotocol.Add new "useWSL" launch attribute. When used, Bash on Windows will be used to launch runtimeExecutable. Source files directory mapping will also be automatically added.
/cc @weinand