Debugging nodejs Mocha tests just "closes explicitly" and does not hit any break points

I am running some simple mocha tests in Nodejs. I want to debug them but none of my breakpoints are hit and I just get a message stating that the process was closed explicitly.

3 comments
Comment actions Permalink

Please can you share the project that shows up the issue? what run configuration do you use for debugging?

0
Comment actions Permalink

I run into this as well in one of my nodejs projects using typescript.

0
Comment actions Permalink

I suddenly made it work, yet I am not sure which, if any, of my steps was the actual solution.

I was using typescript so I enabled the sourceMap in the compilerOptions in the tsconfig.json.

I changed my test execution from `npm` to `mocha`.

In the mocha setting I went for "All in directory" and provided relative path to test folder.

I added a before launch command, as I need to compile the typescript first.

Now the breakpoints are working again.

0

Please sign in to leave a comment.