How to fork a child process that listens on a different debug port than the parent

后端 未结 2 1590
挽巷
挽巷 2020-12-10 15:59

I am trying to use child_process.fork to spawn a process that breaks and listens on the V8 debug protocol.

However, I can\'t get the forked process to

2条回答
  •  执笔经年
    2020-12-10 16:33

    Before to fork remove old debug-brk parameter :

    process.execArgv = process.execArgv.filter(function(o){ 
        var x = "--debug-brk"; 
        return o.substring(0, x.length) !== x
    });
    

    and add a new one:

    process.execArgv.push("--debug-brk=9999");
    

提交回复
热议问题