@@ -1631,9 +1631,6 @@ static void Load(int argc, char *argv[]) {
1631
1631
// who do not like how 'src/node.js' setups the module system but do like
1632
1632
// Node's I/O bindings may want to replace 'f' with their own function.
1633
1633
1634
- process->Set (String::NewSymbol (" _debugWaitConnect" ),
1635
- node::debug_wait_connect ? True () : False ());
1636
-
1637
1634
Local<Value> args[1 ] = { Local<Value>::New (process) };
1638
1635
1639
1636
f->Call (global, 1 , args);
@@ -1744,15 +1741,16 @@ int main(int argc, char *argv[]) {
1744
1741
int v8argc = node::option_end_index;
1745
1742
char **v8argv = argv;
1746
1743
1747
- // v8argv is a copy of argv up to the script file argument +2
1748
- // to expose the v8 debugger js object so that module.js can set
1749
- // a breakpoint on the first line of the startup script
1750
- v8argc += 2 ;
1751
- v8argv = new char *[v8argc];
1752
- memcpy (v8argv, argv, sizeof (argv) * node::option_end_index);
1753
- v8argv[node::option_end_index] = const_cast <char *>(" --expose_debug_as" );
1754
- v8argv[node::option_end_index + 1 ] = const_cast <char *>(" v8debug" );
1755
-
1744
+ if (node::debug_wait_connect) {
1745
+ // v8argv is a copy of argv up to the script file argument +2 if --debug-brk
1746
+ // to expose the v8 debugger js object so that module.js can set
1747
+ // a breakpoint on the first line of the startup script
1748
+ v8argc += 2 ;
1749
+ v8argv = new char *[v8argc];
1750
+ memcpy (v8argv, argv, sizeof (argv) * node::option_end_index);
1751
+ v8argv[node::option_end_index] = const_cast <char *>(" --expose_debug_as" );
1752
+ v8argv[node::option_end_index + 1 ] = const_cast <char *>(" v8debug" );
1753
+ }
1756
1754
V8::SetFlagsFromCommandLine (&v8argc, v8argv, false );
1757
1755
1758
1756
// Ignore SIGPIPE
0 commit comments