From 4322523fcfd7ab7d29e606b3be9a41f790ae1b9b Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 16 Feb 2010 16:24:02 -0800 Subject: [PATCH] [debug] Use ProcessDebugMessage() instead of executing empty script And don't use --debugger_auto_break v8 flag, it seems unnecessary. --- src/node.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/node.cc b/src/node.cc index 39c8f1a095..9646513960 100644 --- a/src/node.cc +++ b/src/node.cc @@ -901,7 +901,7 @@ static void DebugMessageCallback(EV_P_ ev_async *watcher, int revents) { HandleScope scope; assert(watcher == &debug_watcher); assert(revents == EV_ASYNC); - ExecuteString(String::New("1+1;"), String::New("debug_poll")); + Debug::ProcessDebugMessages(); } static void DebugMessageDispatch(void) { @@ -1148,12 +1148,8 @@ int main(int argc, char *argv[]) { V8::SetFatalErrorHandler(node::OnFatalError); -#define AUTO_BREAK_FLAG "--debugger_auto_break" // If the --debug flag was specified then initialize the debug thread. if (node::use_debug_agent) { - // First apply --debugger_auto_break setting to V8. This is so we can - // enter V8 by just executing any bit of javascript - V8::SetFlagsFromString(AUTO_BREAK_FLAG, sizeof(AUTO_BREAK_FLAG)); // Initialize the async watcher for receiving messages from the debug // thread and marshal it into the main thread. DebugMessageCallback() // is called from the main thread to execute a random bit of javascript