nodejs-testing
nodejs-testing copied to clipboard
breakpoints not stoppable with certain libraries bundled
Dear admired authors,
I ran across a daily-work issue that might or might not be a bug concerning starting the debugger from the plugin. In my case I use to bundle the test using esbuild. In some cases depending on the libs included, the debugger runs the test but won't stop at breakpoints.
I managed to condense that into a minimal example: node_test_runner_no_breakpoints.zip
Quoting the README:
This works:
npm installnpm run bundlenpm testThere are issues stopping on breakpoints when starting the debugger from the
node:test runnerplugin.Debugging using the VSCode debugging feature using launch config
unit testalways works.Depending on whether
lodashorunderscoreare included, stopping on breakpoints works or it doesn't.There are other libraries - when included - prevent the debugger from stopping at breakpoints. We tried
rxjsandpixi.js.For this sample we used
lodashandunderscorebecause they are both quite small and very similar.