Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "src: fix stuck debugger process" #3585

Merged
merged 2 commits into from Oct 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/node.cc
Expand Up @@ -3747,6 +3747,7 @@ void Init(int* argc,
uv_async_init(uv_default_loop(),
&dispatch_debug_messages_async,
DispatchDebugMessagesAsyncCallback);
uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async));

#if defined(NODE_V8_OPTIONS)
// Should come before the call to V8::SetFlagsFromCommandLine()
Expand Down Expand Up @@ -4054,11 +4055,8 @@ static void StartNodeInstance(void* arg) {
env->set_trace_sync_io(trace_sync_io);

// Enable debugger
if (instance_data->use_debug_agent()) {
if (instance_data->use_debug_agent())
EnableDebug(env);
} else {
uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async));
}

{
SealHandleScope seal(isolate);
Expand Down
9 changes: 9 additions & 0 deletions test/parallel/test-debug-brk.js
@@ -0,0 +1,9 @@
'use strict';

const common = require('../common');
const assert = require('assert');
const spawnSync = require('child_process').spawnSync;

const args = [`--debug-brk=${common.PORT}`, `-e`, `0`];
const proc = spawnSync(process.execPath, args, {encoding: 'utf8'});
assert(/Debugger listening on/.test(proc.stderr));