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

debugger: --debug-brk should pause until debug client connects #3589

Closed
bnoordhuis opened this issue Oct 29, 2015 · 4 comments
Closed

debugger: --debug-brk should pause until debug client connects #3589

bnoordhuis opened this issue Oct 29, 2015 · 4 comments

Comments

@bnoordhuis
Copy link
Member

See #3585 (comment). Right now it quits:

$ node --debug-brk -e 0
Debugger listening on port 5858
$

I think the intended behavior is for it to wait until a debug client connects, unlike e.g. --debug.

@bnoordhuis
Copy link
Member Author

/cc @indutny

@Trott
Copy link
Member

Trott commented Jun 1, 2016

It appears that, as it is currently written,test/parallel/test-debug-brk.js depends on this bug. If it were not for this bug, that test would not exit:

'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));

@bnoordhuis
Copy link
Member Author

I added test/parallel/test-debug-brk.js in #3585 to catch regressions in the current behavior. I don't think the current behavior is the best or the intended behavior, though.

@Trott
Copy link
Member

Trott commented Jun 1, 2016

Possible fix: #7089

Trott added a commit to Trott/io.js that referenced this issue Jun 4, 2016
The command line flag `--debug-brk` was ignored when the `-e` flag was
also present. This change allows the flags to both be honored when they
are used in a single command line.

Fixes: nodejs#3589
@Trott Trott closed this as completed in 1a21524 Jun 4, 2016
evanlucas pushed a commit that referenced this issue Jun 15, 2016
The command line flag `--debug-brk` was ignored when the `-e` flag was
also present. This change allows the flags to both be honored when they
are used in a single command line.

PR-URL: #7089
Fixes: #3589
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants