vscode-js-debug: URL breakpoints don't bind on Node 8
I am trying to use debugger for a Dockerized Node Typescript project. I set the breakpoints to the lines where i wish to debug the code but the breakpoint doesnt bind. Basically the breakpoint changes from solid red to outlined grey. I have set the port and exposed it in both dockerfile and docker compose.
This is my start script:
"start": "node -r source-map-support/register ./node_modules/.bin/nodemon --inspect=0.0.0.0:9229 ./build/server.js",
This is my launch.json :
{ "version": "0.2.0", "configurations": [ { "name":"sphinx-api", "type": "node", "request": "attach", "restart":true, "port":9229, "localRoot": "${workspaceFolder}/sphinx-api", "remoteRoot": "/api", "trace": true, "resolveSourceMapLocations": [ "${workspaceFolder}/**", "!**/node_modules/**" ], } ] }
This is my tsconfig.json file:
{ "compileOnSave": true, "compilerOptions": { "lib": ["es2015","es2016","es2017"], "suppressImplicitAnyIndexErrors": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "moduleResolution": "node", "noImplicitReturns": false, "noEmitOnError": true, "strictNullChecks": true, "traceResolution": false, "noUnusedLocals": true, "noUnusedParameters": false, "noImplicitAny": true, "alwaysStrict": true, "strict": true, "module": "commonjs", "outDir": "./build", "baseUrl": "./src", "target": "es2017", "inlineSourceMap": true, "allowJs": true, "pretty": true, }, "include": [ "./package.json", "./tsconfig.json", "./src/**/*" ], "paths": { "src/*" : ["./src/**/*"] }, "types": [ "@types/underscore" ] }
Below I have attached the images of Debugger getting attached and troubleshooting log of unbound breakpoint. I am not sure why is it not setting and the code executes but it doesnt stop at breakpoint. It was working fine 3 4 days back.
Any help would be appreciated.
vs code version: 1.83 Node version: 8.9.4 Typescript version: 2.6.2
About this issue
- Original URL
- State: open
- Created 8 months ago
- Comments: 17 (5 by maintainers)
You can install the nightly version of the debugger, right click and pick “Install Another Version”, and then install an older version. Versions
<=2023.8.*
should work for you.