Start NodeJs debugging

Answered

I am building a plugin that can run TestCafe (NodeJs tool) (https://github.com/lilbaek/webstorm-testcafe/).

I have the run part working and I am now working on adding debug support.

I have not been able to find any documentation on how to connect to a NodeJs process for debugging and looking at the source code of other plugins has not gotten me anywhere.
I am spawning the NodeJs process with debugging enabled using: NodeCommandLineUtil.addNodeOptionsForDebugging.
After doing this is try and start an XDebug session using: NodeDebugProgramRunnerKt.createNodeJsDebugProcess but the IDE never enters debugging mode.

See: https://github.com/lilbaek/webstorm-testcafe/blob/master/src/main/java/org/lilbaek/webstorm/testcafe/debug/TestCafeProgramDebugRunner.java

Do anyone know of a plugin doing this or have a suggestion as to what I am missing?

Thanks.

0
1 comment

Got it working. If anyone is interested the code is on github :)  - https://github.com/lilbaek/webstorm-testcafe

0

Please sign in to leave a comment.