VSCode doesn't hit breakpoint (running via node `tsdx/dist/index.js test`)
See original GitHub issueHi, I need a little help here, I am trying to debug jest tests using VScode debugger. when running the debug mode, the application runs smoothly without hitting and stoping on breakoints.
this is my launch.json
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest Test",
"program": "${workspaceFolder}/node_modules/tsdx/dist/index.js",
"args": [
"test"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"outFiles": ["${workspaceFolder}/dist"],
"protocol": "inspector",
}
]
Am I missing somehting?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
Debug Node.js Apps using Visual Studio Code
The Visual Studio Code editor includes Node.js debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >Visual Studio Code - Node debugger breakpoints not being hit
1 , the fix that worked for me was: Disable debug.javascript.usePreview via Code > Preferences > Settings. Add "localRoot": "${workspaceFolder}/ ...
Read more >The Absolute Easiest Way to Debug Node.js - with VS Code
Unlike JavaScript in the browser, or Java with a powerful IDE like IntelliJ, you can't just set breakpoints everywhere, refresh the page or ......
Read more >How To Debug Node.js Code in Visual Studio Code
For this tutorial, you can apply the lessons to one of your JavaScript projects that can be run on a Node server. There...
Read more >How to debug Node.js apps in Visual Studio Code
Learn how to debug your Node.js applications with Visual Studio Code, even with languages transpiling to JavaScript.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok tried this out myself on one of my libraries and got it to work without much fuss. My
launch.json
has some differences:Notably,
--inspect-brk
and that I didn’t change the defaultprogram
(fromnode
) and instead added${workspaceRoot}/node_modules/tsdx/dist/index.js
to theargs
after--inspect-brk
Idk if this follows best practices but it does work
yes! works perfectly. thank you