Index: src/d8.cc |
=================================================================== |
--- src/d8.cc (revision 2077) |
+++ src/d8.cc (working copy) |
@@ -460,6 +460,16 @@ |
#ifdef ENABLE_DEBUGGER_SUPPORT |
// Set the security token of the debug context to allow access. |
i::Debug::debug_context()->set_security_token(i::Heap::undefined_value()); |
+ |
+ // Start the debugger agent if requested. |
+ if (i::FLAG_debugger_agent) { |
+ v8::Debug::EnableAgent("d8 shell", i::FLAG_debugger_port); |
+ } |
+ |
+ // Start the in-process debugger if requested. |
+ if (i::FLAG_debugger && !i::FLAG_debugger_agent) { |
+ v8::Debug::SetDebugEventListener(HandleDebugEvent); |
+ } |
#endif |
} |
@@ -721,16 +731,6 @@ |
RunRemoteDebugger(i::FLAG_debugger_port); |
return 0; |
} |
- |
- // Start the debugger agent if requested. |
- if (i::FLAG_debugger_agent) { |
- v8::Debug::EnableAgent("d8 shell", i::FLAG_debugger_port); |
- } |
- |
- // Start the in-process debugger if requested. |
- if (i::FLAG_debugger && !i::FLAG_debugger_agent) { |
- v8::Debug::SetDebugEventListener(HandleDebugEvent); |
- } |
#endif |
} |
if (run_shell) |