Skip to content

inspector: add --inspect-brk flag - #8979

Merged
joshgav merged 1 commit into
nodejs:masterfrom
joshgav:inspect-brk
Jan 3, 2017
Merged

inspector: add --inspect-brk flag#8979
joshgav merged 1 commit into
nodejs:masterfrom
joshgav:inspect-brk

Conversation

@joshgav

@joshgavjoshgav commented Oct 7, 2016

Copy link
Copy Markdown
Contributor
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.

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 7, 2016
@cjihrig

Copy link
Copy Markdown
Contributor

If this gets merged, it should have tests.

@jasnelljasnell added the wip Issues and PRs that are still a work in progress. label Oct 7, 2016
@eugeneo

Copy link
Copy Markdown
Contributor

@mscdexmscdex mentioned this pull request Oct 7, 2016
4 tasks
@mscdexmscdex added the inspector Issues and PRs related to the V8 inspector protocol label Oct 7, 2016
@joshgav
joshgavforce-pushed the inspect-brk branch 2 times, most recently from 5f41374 to 24d5e39CompareOctober 11, 2016 20:41
@joshgavjoshgav removed the wip Issues and PRs that are still a work in progress. label Oct 11, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary?

Copy link
Copy Markdown
ContributorAuthor

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.

Copy link
Copy Markdown
ContributorAuthor

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?

Copy link
Copy Markdown
Contributor

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.

@rvagg
rvaggforce-pushed the master branch 2 times, most recently from c133999 to 83c7a88CompareOctober 18, 2016 17:02
@nojvek

Copy link
Copy Markdown

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?

@joshgavjoshgav closed this Dec 15, 2016
@joshgavjoshgav reopened this Dec 15, 2016
joshgav added a commit to joshgav/node that referenced this pull request Dec 15, 2016
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

Copy link
Copy Markdown
ContributorAuthor

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

@cjihrig@ofrobots@eugeneo LGTY? Thanks!

@joshgav

Copy link
Copy Markdown
ContributorAuthor

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 <eostroukhov@chromium.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@keybase.io>
@joshgav

Copy link
Copy Markdown
ContributorAuthor

landed in 6ff3b03

@targos

Copy link
Copy Markdown
Member

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

@targostargos added semver-minor PRs that contain new features and should be released in the next minor version. dont-land-on-v4.x labels Jan 28, 2017
@italoacasas

Copy link
Copy Markdown

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

@joshgav

Copy link
Copy Markdown
ContributorAuthor

@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

italoacasas commented Feb 4, 2017

Copy link
Copy Markdown

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

@jasnelljasnell mentioned this pull request Apr 4, 2017
Comment threadsrc/node.cc
" --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"

Copy link
Copy Markdown
Contributor

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

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

Labels

c++Issues and PRs that require attention from people who are familiar with C++.inspectorIssues and PRs related to the V8 inspector protocolsemver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@joshgav@cjihrig@eugeneo@nojvek@targos@italoacasas@sam-github@jasnell@mscdex@MylesBorins@evanlucas@nodejs-github-bot