vscode: Unable to debug with integrated terminal (WSL)
- VSCode Version: 1.23.1 & 1.24.0-insider
- OS Version: Windows 10 - 1803
Steps to Reproduce:
- Create a node launch config
- Run with console set to “integratedTerminal”
This then launches a new integrated terminal, and executes the following:
➜ cd c:\Code\debug && node --inspect-brk=30756
Which in my case is invalid due to the initial cd c:\Code\debug
, as I am using wsl:
cd: no such file or directory: c:Codedebug
I am aware of the previous issues involving this being closed as the problem was fixed, however this no longer seems to be the case.
Sample config:
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"console": "integratedTerminal",
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (5 by maintainers)
We just announced remote development with VS Code, check out the blog post for details https://code.visualstudio.com/blogs/2019/05/02/remote-development
@adityawibisana
node debug app.js
might work for you right now, per Node.js Foundation websiteThat was 2 years ago. Unless you have a specific reason to use v7/the old protocol, using
--inspect
/--inspect-brk
is advisable as they are two different mechanisms, not just an alias.Also the port for
--inspect
/--inspect-brk
defaults to9229
not5858
like the old debugger. If your launch config specifies that the port to be used is5858
, you’d need to specify that when spawning the process as well.--inspect=5858
/--inspect-brk=5858
Hopefully that clears up any confusion for a visitor from google in a year or two. 😉
@ltomes and @virgilwashere : first I need the extension, and it is working. Turn out that it is working without extension too. Last config:
On my case, most important part is the
remoteRoot
, which should point to your corresponding folder.Do note that this one is
attach
, so you need to manuallynode debug app.js
your project firstI recently created a VS Code extension: WSL workspaceFolder, which may help.
Have you tried
"useWSL": true
?