"Cannot find debug adapter for type 'node'. "

Rajkumar Natarajan picture Rajkumar Natarajan · Jul 23, 2019 · Viewed 10.2k times · Source

I'm trying to debug node script in vs code.

Below is my launch.json -

    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "node",
                "request": "launch",
                "name": "Debug sql report",
                "program": "${workspaceFolder}/scripts/debug_sql.js"
            }
        ]
    }

when I run I get an error Cannot find debug adapter for type 'node'.

VS Code NodeJs Debugger Error

My code version is - Version 1.36.1 (1.36.1)

Node debugger used to work earlier. But not sure why it is not working now.

Any idea how to fix this?

Answer

Elliott de Launay picture Elliott de Launay · Sep 3, 2019

I had to restart vscode.

Not sure if it's connected but my app crashed because of JavaScript heap out of memory error.