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

Merged
merged 1 commit into from Jan 3, 2017

Conversation

@joshgav
Member

joshgav commented Oct 7, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected 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.

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Oct 7, 2016

Contributor

If this gets merged, it should have tests.

Contributor

cjihrig commented Oct 7, 2016

If this gets merged, it should have tests.

@jasnell jasnell added the in progress label Oct 7, 2016

@eugeneo

This comment has been minimized.

Show comment
Hide comment
Contributor

eugeneo commented Oct 7, 2016

@mscdex mscdex referenced this pull request Oct 7, 2016

Closed

inspector,doc: update hint text, add guide #8978

4 of 4 tasks complete

@mscdex mscdex added the inspector label Oct 7, 2016

@joshgav joshgav removed the in progress label Oct 11, 2016

Show outdated Hide outdated test/parallel/test-cluster-inspector-debug-port.js
@@ -13,7 +13,7 @@ if (cluster.isMaster) {
function fork(offset, execArgv) {
if (execArgv)
cluster.setupMaster({execArgv});
cluster.setupMaster({args: execArgv});

This comment has been minimized.

@cjihrig

cjihrig Oct 12, 2016

Contributor

Is this change necessary?

@cjihrig

cjihrig Oct 12, 2016

Contributor

Is this change necessary?

This comment has been minimized.

@joshgav

joshgav Oct 13, 2016

Member

Strangely it didn't work for me without it. Let me check again though.

@joshgav

joshgav Oct 13, 2016

Member

Strangely it didn't work for me without it. Let me check again though.

This comment has been minimized.

@joshgav

joshgav Oct 14, 2016

Member

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?

@joshgav

joshgav Oct 14, 2016

Member

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?

This comment has been minimized.

@cjihrig

cjihrig Oct 16, 2016

Contributor

@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.

@cjihrig

cjihrig Oct 16, 2016

Contributor

@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.

@nojvek

This comment has been minimized.

Show comment
Hide comment
@nojvek

nojvek Oct 20, 2016

Contributor

Should this be visible in in the help text of node -h. Currently inspect is insider knowledge and not discoverable. Inspector has been merged in node for a while, is its status still experimental?

Contributor

nojvek commented Oct 20, 2016

Should this be visible in in the help text of node -h. Currently inspect is insider knowledge and not discoverable. Inspector has been merged in node for a while, is its status still experimental?

@joshgav joshgav closed this Dec 15, 2016

@joshgav joshgav reopened this Dec 15, 2016

joshgav added a commit to joshgav/node that referenced this pull request Dec 15, 2016

src, inspector: add --inspect-brk option
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>
@joshgav

This comment has been minimized.

Show comment
Hide comment
@joshgav

joshgav Dec 15, 2016

Member

Rebased, moved test to a better place, and added docs to command-line help.

@cjihrig @ofrobots @eugeneo LGTY? Thanks!

Member

joshgav commented Dec 15, 2016

Rebased, moved test to a better place, and added docs to command-line help.

@cjihrig @ofrobots @eugeneo LGTY? Thanks!

@jasnell

One minor nit but otherwise LGTM

Show outdated Hide outdated src/node_debug_options.cc
@@ -8,6 +8,7 @@
namespace node {
namespace {

This comment has been minimized.

@jasnell

jasnell Dec 23, 2016

Member

unnecessary new line here

@jasnell

jasnell Dec 23, 2016

Member

unnecessary new line here

@joshgav

This comment has been minimized.

Show comment
Hide comment
Member

joshgav commented Jan 3, 2017

src, inspector: add --inspect-brk option
add an --inspect-brk option which breaks on
first line of user script. same behavior as old
--debug-brk flag.

PR-URL: #8979
Reviewed-By: Eugene Ostroukhov <eostroukhov@chromium.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@keybase.io>

@joshgav joshgav merged commit 6ff3b03 into nodejs:master Jan 3, 2017

@joshgav

This comment has been minimized.

Show comment
Hide comment
@joshgav

joshgav Jan 3, 2017

Member

landed in 6ff3b03

Member

joshgav commented Jan 3, 2017

landed in 6ff3b03

@targos

This comment has been minimized.

Show comment
Hide comment
@targos

targos Jan 28, 2017

Member

This is semver-minor, right? Adding the label.

Member

targos commented Jan 28, 2017

This is semver-minor, right? Adding the label.

@italoacasas

This comment has been minimized.

Show comment
Hide comment
@italoacasas

italoacasas Jan 31, 2017

Member

This is not landing clearly in v7, there is plan to backport this ?

Member

italoacasas commented Jan 31, 2017

This is not landing clearly in v7, there is plan to backport this ?

@joshgav

This comment has been minimized.

Show comment
Hide comment
@joshgav

joshgav Feb 3, 2017

Member

@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!

Member

joshgav commented Feb 3, 2017

@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!

@italoacasas

This comment has been minimized.

Show comment
Hide comment
@italoacasas

italoacasas Feb 4, 2017

Member

@joshgav for the v7.x-staging branch I think everyone can land the backport PR after the proper review. At this point is like landing something in master.

Member

italoacasas commented Feb 4, 2017

@joshgav for the v7.x-staging branch I think everyone can land the backport PR after the proper review. At this point is like landing something in master.

@jasnell jasnell referenced this pull request Apr 4, 2017

Closed

8.0.0 Release Proposal #12220

" --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"

This comment has been minimized.

@sam-github

sam-github Apr 22, 2017

Member

--inspect-port was omitted from the docs, see #12581

@sam-github

sam-github Apr 22, 2017

Member

--inspect-port was omitted from the docs, see #12581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment