Browse Source

debugger: Make the debugger timeout configurable

If the NODE_DEBUGGER_TIMEOUT environment variable is set, then use
that as the number of ms to wait for the debugger to start.

This is primarily to work around a race condition that almost never
happens in real usage with the debugger, but happens EVERY FRACKING
TIME when the debugger tests run as part of 'make test'.
v0.9.9-release
isaacs 12 years ago
parent
commit
916aebabb8
  1. 3
      src/node.js
  2. 1
      test/simple/test-debugger-client.js
  3. 1
      test/simple/test-debugger-repl-utf8.js
  4. 1
      test/simple/test-debugger-repl.js

3
src/node.js

@ -111,7 +111,8 @@
// global.v8debug object about a connection, and runMain when
// that occurs. --isaacs
setTimeout(Module.runMain, 50);
var debugTimeout = +process.env.NODE_DEBUG_TIMEOUT || 50;
setTimeout(Module.runMain, debugTimeout);
} else {
// REMOVEME: nextTick should not be necessary. This hack to get

1
test/simple/test-debugger-client.js

@ -22,6 +22,7 @@
process.env.NODE_DEBUGGER_TIMEOUT = 200;
var common = require('../common');
var assert = require('assert');
var debug = require('_debugger');

1
test/simple/test-debugger-repl-utf8.js

@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
process.env.NODE_DEBUGGER_TIMEOUT = 200;
var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;

1
test/simple/test-debugger-repl.js

@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
process.env.NODE_DEBUGGER_TIMEOUT = 200;
var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;

Loading…
Cancel
Save