-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
inspector: add --inspect-brk flag #8979
Conversation
If this gets merged, it should have tests. |
https://github.com/nodejs/node/blob/master/test/inspector/inspector-helper.js#L404 - I think this flag can be used here. |
5f41374
to
24d5e39
Compare
@@ -13,7 +13,7 @@ if (cluster.isMaster) { | |||
|
|||
function fork(offset, execArgv) { | |||
if (execArgv) | |||
cluster.setupMaster({execArgv}); | |||
cluster.setupMaster({args: execArgv}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strangely it didn't work for me without it. Let me check again though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay figured out this one for the moment and fixed in latest commit. Now I need to figure out how to run code inside the worker process - which I'm not sure how to do since it breaks immediately with --inspect-brk
, orphaning the child. Any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshgav I think you'd have to connect to the debugger to move past the break. There are other tests that exercise --debug-brk
, but I don't think any that do it with the cluster module. Maybe this would be better to move to a separate test.
c133999
to
83c7a88
Compare
Should this be visible in in the help text of |
add an --inspect-brk option which breaks on first line of user script. same behavior as old --debug-brk flag. PR-URL: nodejs#8979 Reviewed-By: <tbd> Reviewed-By: <tbd>
CI passed, going to land: https://ci.nodejs.org/job/node-test-pull-request/5690/ |
add an --inspect-brk option which breaks on first line of user script. same behavior as old --debug-brk flag. PR-URL: nodejs#8979 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
landed in 6ff3b03 |
This is semver-minor, right? Adding the label. |
This is not landing clearly in v7, there is plan to backport this ? |
@italoacasas backported in #11149, which should be followed with #11114 to fix the misaligned help text. Would you do the landing on the 7.x branch, or would I do that? Thanks! |
@joshgav for the |
" --inspect[=host:port] activate inspector on host:port\n" | ||
" (default: 127.0.0.1:9229)\n" | ||
" --inspect-brk[=host:port] activate inspector on host:port\n" | ||
" and break at start of user script\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--inspect-port was omitted from the docs, see #12581
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
inspector
Description of change
add
--inspect-brk
flag to provide same behavior as--debug-brk
flag but for inspector. This allows complete separation of inspector and debugger (old debugger) flags.