Author: [email protected]
Date: Mon Jun  8 23:53:15 2009
New Revision: 2124

Modified:
    branches/bleeding_edge/src/d8.cc

Log:
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

Modified: branches/bleeding_edge/src/d8.cc
==============================================================================
--- branches/bleeding_edge/src/d8.cc    (original)
+++ branches/bleeding_edge/src/d8.cc    Mon Jun  8 23:53:15 2009
@@ -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
  }

@@ -720,16 +730,6 @@
      if (i::FLAG_remote_debugger) {
        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
    }

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to