Reputation: 5813
I have an existing node.js express project that I was able to debug using WSL2 on Windows 10 in Visual Studio Code by just highlighting my app's entry point file (app.js) and hitting F5. After I installed an update to VSC yesterday (now on 1.6.3), F5 no longer does anything but flash up the debug toolbar briefly. Breakpoints aren't hit. No messages are output. Any ideas on how to get this working again?
P.S. I'm still able to debug using VSC directly in Windows, but WSL2/Ubuntu doesn't work. I tried creating a simple project from scratch in both.
Upvotes: 0
Views: 359
Reputation: 5813
I was able to get this working by adding a .vscode/launch.json file. Prior to upgrading, I did not need this file.
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/index.js",
"runtimeVersion": "14.17.4",
"trace": true,
}
]
}
Upvotes: 1