Commit dc68e0f9 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Activate the debugger in the developer shell earlier.

This will support breaking in debugger statements in JavaScript files read from the command line.
Review URL: http://codereview.chromium.org/113998

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0bfd850a
......@@ -460,6 +460,16 @@ void Shell::Initialize() {
#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 @@ int Shell::Main(int argc, char* argv[]) {
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment