nodejs-testing icon indicating copy to clipboard operation
nodejs-testing copied to clipboard

breakpoints not stoppable with certain libraries bundled

Open joergplewe opened this issue 2 years ago • 0 comments

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 install
  • npm run bundle
  • npm test

There are issues stopping on breakpoints when starting the debugger from the node:test runner plugin.

Debugging using the VSCode debugging feature using launch config unit test always works.

Depending on whether lodash or underscore are included, stopping on breakpoints works or it doesn't.

There are other libraries - when included - prevent the debugger from stopping at breakpoints. We tried rxjs and pixi.js.

For this sample we used lodash and underscore because they are both quite small and very similar.

joergplewe avatar Jun 22 '23 09:06 joergplewe