'How do I use VS Code debugging for NodeJS with WSL2?
I am building a node.js app on an Ubuntu from WSL2. I cannot get VS Code's debugger to 'attach' unless I use the "Remote -WSL" extension (which has it's own problems with symlinks).
Does anyone have experience configuring VS Code debugger for WSL2?
Anyone know how to get VS Code to launch the debugger, without "Remote - WSL" extension?
I am expecting to be able to click "Run and Debug" and then click Run>Node.js using the active (opened) index.js file.
I'm guessing there's some VS Code config that I need to try. I saw something about a "useWSL" : true setting in launch.json in the project repo but didn't have luck there -- though I may try that again after a system/WSL restart.
I've followed these instructions so far:
- https://code.visualstudio.com/docs/nodejs/nodejs-debugging
- https://www.youtube.com/watch?v=o-L1OCmWPDA
- https://www.youtube.com/watch?v=2oFKNL7vYV8&t=87s
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
