mirror of https://github.com/nodejs/node.git
Revert "debug: Wait 50ms before running the main module"
This reverts commit c781f17742
.
pull/24503/head
parent
5e8c2b0768
commit
00224771e3
29
src/node.js
29
src/node.js
|
@ -89,31 +89,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var Module = NativeModule.require('module');
|
var Module = NativeModule.require('module');
|
||||||
|
// REMOVEME: nextTick should not be necessary. This hack to get
|
||||||
if (global.v8debug &&
|
// test/simple/test-exception-handler2.js working.
|
||||||
process.execArgv.some(function(arg) {
|
// Main entry point into most programs:
|
||||||
return arg.match(/^--debug-brk(=[0-9]*)?$/);
|
process.nextTick(Module.runMain);
|
||||||
})) {
|
|
||||||
|
|
||||||
// XXX Fix this terrible hack!
|
|
||||||
//
|
|
||||||
// Give the client program a few ticks to connect.
|
|
||||||
// Otherwise, there's a race condition where `node debug foo.js`
|
|
||||||
// will not be able to connect in time to catch the first
|
|
||||||
// breakpoint message on line 1.
|
|
||||||
//
|
|
||||||
// A better fix would be to somehow get a message from the
|
|
||||||
// global.v8debug object about a connection, and runMain when
|
|
||||||
// that occurs. --isaacs
|
|
||||||
|
|
||||||
setTimeout(Module.runMain, 50);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// REMOVEME: nextTick should not be necessary. This hack to get
|
|
||||||
// test/simple/test-exception-handler2.js working.
|
|
||||||
// Main entry point into most programs:
|
|
||||||
process.nextTick(Module.runMain);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var Module = NativeModule.require('module');
|
var Module = NativeModule.require('module');
|
||||||
|
|
Loading…
Reference in New Issue