VSCode debugger troubleshoot

26 Views Asked by At

i'm having throubles configuring VSCode debugger. actually i never used it so much, but now i will move to that because i'm working on aws lambda js. i'm trying to configure the degubber but any command that i run i keep getting the following error

Exception has occurred: Error: ENOENT: no such file or directory, stat '/Users/stefanogrado/.nvm/versions/node/v16.13.2/bin/git'

currently i'm using nvm to manage different node version.

to test the simplest possible configuration i defined my launch.json file to simple execute an npm -vat the debugger launch, but even this cause the error.

to avoid any possible interference i disabled any kind of plugin (leaving only ESLint, Material Icon Theme, TODO Highlight)

nvm version 0.39.1

node version used v16.13.2

npm version used 8.1.2

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Debug Serverless",
            "cwd": "${workspaceFolder}",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "-v",
            ],
            "outFiles": ["${workspaceRoot}/.webpack/service/src/*.js"],
            "sourceMaps": true
        }
    ]
}

Action Start Debugging (F5)

Debug console executed command. /Users/stefanogrado/.nvm/versions/node/v16.13.2/bin/npm -v

Error:

Exception has occurred: Error: ENOENT: no such file or directory, stat '/Users/stefanogrado/.nvm/versions/node/v16.13.2/bin/git'
  at Object.statSync (node:fs:1536:3)
    at Object.statSync (/Users/stefanogrado/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:312:16)
    at Function.sync (/Users/stefanogrado/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/isexe/mode.js:13:23)
    at Function.sync (/Users/stefanogrado/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/isexe/index.js:49:17)
    at Function.whichSync [as sync] (/Users/stefanogrado/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/which/which.js:104:26)
    at Object.<anonymous> (/Users/stefanogrado/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/@npmcli/git/lib/which.js:5:19)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
0

There are 0 best solutions below