@@ -1631,6 +1631,9 @@ 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
+
1634
1637
Local<Value> args[1 ] = { Local<Value>::New (process) };
1635
1638
1636
1639
f->Call (global, 1 , args);
@@ -1741,16 +1744,15 @@ int main(int argc, char *argv[]) {
1741
1744
int v8argc = node::option_end_index;
1742
1745
char **v8argv = argv;
1743
1746
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
- }
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
+
1754
1756
V8::SetFlagsFromCommandLine (&v8argc, v8argv, false );
1755
1757
1756
1758
// Ignore SIGPIPE
0 commit comments