#StackBounty: #node.js #typescript #webstorm #nvm #ts-node WebStorm + nvm + Typescript + ts-node + Breakpoint Debugging – Randomly Stop…

Bounty: 50

I have an issue with WebStorm that I can’t seem to figure out and JetBrains hasn’t been much help either.

It appears to sometimes show up, sometimes go away, and just flat out make zero sense. Debugging breakpoints in WebStorm will flat out stop working if they’re inside of a non spec file function.

I’m using mocha, and my setup is as follows:

  • nvm – using node 14.16.1
  • mocha 9.02
  • User interface: BDD

Env. Variables:

NODE_ENV=development;TS_NODE_FILES=true;TS_NODE_TRANSPILE_ONLY=true;TS_NODE_PROJECT=tsconfig.tests.json

Extra Mocha Options:

--require ts-node/register

Test file patterns:

src/tests/unit/**/*.ts

JetBrains had thought it was my code base, however, if I were to take and setup my other laptop with it, it breakpoints and works fine. However with WebStorm it randomly stops allowing me to breakpoint debug into nested functions…

I’ve tried uninstalling the nvm node version and reinstalling, wiped out node_modules and reinstalling, tried installing different node version and rebuilding node_modules. Nothing seems to resolve it.

One interesting piece, breakpoints work as expected when I don’t run Spec files and run the app normally.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.