我正在尝试调试使用以下代码创建的 Node.JS 子进程:
var child = require('child_process');
child .fork(__dirname + '/task.js');
问题在于在IntelliJ/WebStorm中运行时,父进程和子进程都在同一个端口上启动。
debugger listening on port 40893
debugger listening on port 40893
因此,它只能调试父进程。
是否有一种方法可以将IntelliJ设置为调试子进程或强制其在不同的端口上启动,以便我可以在远程调试中连接它?