Debugging Node.js processes with cluster.fork()

前端 未结 6 2104
南方客
南方客 2020-12-23 21:39

I\'ve got some code that looks very much like the sample in the Cluster documentation at http://nodejs.org/docs/v0.6.0/api/cluster.html, to wit:

var cluster          


        
6条回答
  •  生来不讨喜
    2020-12-23 22:24

    if you use VSCode to debug, you need to specify the port and and "autoAttachChildProcesses": true in the lanuch.json file.

    If you debug directly in DevTool, you need to add a connection to the corresponding port in the console.

提交回复
热议问题