Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not debug cluster.fork code #30904

Closed
songguangyu opened this issue Jul 18, 2017 · 1 comment
Closed

can not debug cluster.fork code #30904

songguangyu opened this issue Jul 18, 2017 · 1 comment
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@songguangyu
Copy link

songguangyu commented Jul 18, 2017

can not debug cluster.fork code

  • VSCode Version: 1.14.1 (
  • OS Version: 10.11.2 (
var cluster = require('cluster');  
var http = require('http');  
var numCPUs = require('os').cpus().length;  
process.execArgv[1] = process.execArgv[1].replace('-brk', '');
if (cluster.isMaster) {  
  console.log("master start...");  
  for (var i = 0; i < numCPUs; i++) {
    cluster.fork();
  }  

  cluster.on('listening',function(worker,address){  
      console.log('listening: worker ' + worker.process.pid +', Address: '+address.address+":"+address.port);  
  });  

  cluster.on('exit', function(worker, code, signal) {  
      console.log('worker ' + worker.process.pid + ' died');  
  });  
} else {
  http.createServer(function(req, res) {
    console.log(11);
      res.writeHead(200);  
      res.end("hello world\n");  
  }).listen(8878);  
} 
@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 18, 2017
@weinand
Copy link
Contributor

weinand commented Jul 18, 2017

duplicate of #3201

@weinand weinand marked this as a duplicate of #3201 Jul 18, 2017
@weinand weinand closed this as completed Jul 18, 2017
@weinand weinand added bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) and removed bug Issue identified by VS Code Team member as probable bug labels Jul 18, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants