Search code examples
node.jsintellij-ideaintellij-plugin

How to implement a DebugProgramRunner


I have a javascript execution engine, which based on NodeJs.I use idea start my execution engine, then it start a node by command "node --inspect-brk=30000 example.js", i don't know how to implement a debugProgramRunner to connect to that node, what should i do?

I am not sure, but now i implement a NodeJSDebuggableConfiguration and override createDebugProcess method, nodejs debug connection is based on web socket, what type of VmConnection should i use?


Solution

  • Probably, it's enough to return NodeDebugProgramRunnerKt.createDebugProcess(this, socketAddress, session, executionResult) in createDebugProcess, it will create VmConnection itself.