Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code - Node breakpoint is unbound

I'm working in a serverless project (node) and I'm not able to set a breakpoint (always unbound) using VS code:

Version: 1.48.0
Commit: db40434f562994116e5b21c24015a2e40b2504e6
Date: 2020-08-13T07:40:55.768Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-42-generic

Here is my launch.json file:

{
    "version": "0.2.0",
    "configurations": [
     {
      "name": "Debug",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "npm",
      "runtimeArgs": [
       "run-script",
       "debug"
      ],
      "port": 5858
     }
    ]
   }

The application is being launched in debug mode but I can't add any breakpoint. Any workaround available?

like image 511
user2919910 Avatar asked Sep 20 '25 22:09

user2919910


1 Answers

The workaround that worked for me is:

  • Open the extensions view (ctrl+shift+x) and search for @builtin @id:ms-vscode.js-debug
  • Right click on the JavaScript Debugger extension and disable it.
  • Search for @id:ms-vscode.js-debug-nightly in the extensions view.
  • Install that extension.

Open your settings.json (users/[user]/Appdata/roaming/code/user/) and add:

"debug.javascript.usePreview": false

Hope it works for you.

like image 77
Luis Oviedo Avatar answered Sep 22 '25 11:09

Luis Oviedo