Add support for Windows Subsystem Linux#158
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.
|
Not sure if this is the correct place to ask, but how do I use something like the I've tried all the combinations I can think of for I could install babel-node globally so it's in my PATH, but that's not recommended and is a pain to remember to update. Edit: Actually it looks like this might be to do with the fact that Edit 2: If I turn it into a proper file I get a little further, however a new issue crops up: That shouldn't have a Windows path should it? But using a WSL path in for If I run the equivalent with a relative path within a WSL terminal like: you can see it works fine. launch.json config: |
|
@noinkling try this: {
"type": "node",
"request": "launch",
"name": "Launch Program",
"useWSL": true,
"program": "${workspaceFolder}/src/server/index.js",
"protocol": "legacy",
"runtimeExecutable": "./node_modules/.bin/babel-node"
}When you specify The |
|
Thanks, it seems I missed the
disclaimer in the release notes (or maybe it was added later?). I'm using Node 8 so the legacy protocol isn't an option, guess I'll just have to wait a little longer. |
|
YES! It's in the latest production release. Thank you! |
Continued from #156.
Refactored the code to a separate file and kept the code changes to the minimum. Per @nelak suggestion now we use
bash -ic.