GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: introduce inspect-brk-node by danbev · Pull Request #20819 · nodejs/node

Conversation

@danbev

@danbev danbev commented May 18, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This commit is a suggestion to add a new option to the node executable
to allow for breaking in node's javascript bootstrapper code.

Previously I've been able to set breakpoints in node bootstrapper code
and then restart the debugging session and those breakpoints would be
hit, but I don't seem to be able to do so anymore. Having this option
would allow me to use this option and then step through or add more
break points as needed.

Currently test are missing as I wanted to see if this is worth
pursuing first.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels May 18, 2018
@danbev

danbev commented May 18, 2018

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/14957/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented May 18, 2018

Copy link
Copy Markdown
Member

Is there another way to accomplish this? I don't really like the idea of adding a new option (certainly not a documented option) for functionality that is probably only relevant to core developers.

danbev, benjamingr, and BridgeAR reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danbev

danbev commented May 18, 2018

Copy link
Copy Markdown
Contributor Author

Is there another way to accomplish this?

I'm not sure and part of the reason for opening this pr. Hopefully someone more familiar can chime in if there are other ways to achieve this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eugeneo

eugeneo commented May 21, 2018

Copy link
Copy Markdown
Contributor

Your original approach (setting a breakpoint) should still work. We need to look into why it does not. Another option is to add a "debugger" statement into the bootstrap code.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danbev

danbev commented May 22, 2018

Copy link
Copy Markdown
Contributor Author

Your original approach (setting a breakpoint) should still work.

Would you be able to try this out just to make sure this is not something local to my environment?

Another option is to add a "debugger" statement into the bootstrap code.

That works for sure, the only downside is that it requires a recompilation when added to any of the core javascript sources.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented May 28, 2018

Copy link
Copy Markdown
Member

Adding the @nodejs/tsc review label to get some more opinions.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR BridgeAR added the tsc-review label May 28, 2018
mcollina
mcollina reviewed May 28, 2018
View reviewed changes
Comment thread src/node.cc Outdated

@mcollina mcollina May 28, 2018

Copy link
Copy Markdown
Member

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.

If it's only relevant to Node core developers, I do not think we should really document this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@joyeecheung joyeecheung May 28, 2018

Copy link
Copy Markdown
Member

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.

Maybe we can document this somewhere in doc/guide?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jasnell jasnell May 29, 2018

Copy link
Copy Markdown
Member

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.

Yeah, this seems to fall along the same lines as --expose-internals... we don't document that one for similar reasons

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@danbev danbev May 30, 2018

Copy link
Copy Markdown
Contributor Author

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.

I'll remove the info from PrintHelp and take a look at adding this to doc/guide. Thanks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@danbev danbev Jun 20, 2018

Copy link
Copy Markdown
Contributor Author

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.

I've not really been able to find a good place for this in any of the docs in doc/guide. @joyeecheung Do you have any suggestions where this might go?

Would it be alright if it is not documented as that seems to be the case for --expose-internals?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@danbev danbev added wip Issues and PRs that are still a work in progress. and removed wip Issues and PRs that are still a work in progress. labels May 30, 2018
@danbev

danbev commented Jun 5, 2018

Copy link
Copy Markdown
Contributor Author
node-test-commit-freebsd failure looks unrelated

console output:

HTTP ERROR 404
Problem accessing /job/node-test-commit-freebsd/nodes=freebsd11-x64/17862/. Reason:

    Not Found
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung approved these changes Jun 7, 2018
View reviewed changes
danbev added 2 commits June 7, 2018 13:10
@danbev
src: introduce inspect-brk-node
a2a1d0a
This commit is a suggestion to add a new option to the node executable
to allow for breaking in node's javascript bootstrapper code.

Previously I've been able to set breakpoints in node bootstrapper code
and then restart the debugging session and those breakpoints would be
hit, but I don't seem to be able to do so anymore. Having this option
would allow me to use this option and then step through or add more
break points as needed.

$ ./node --help
Usage: node [options] [ -e script | script.js | - ] [arguments]
       node inspect script.js [arguments]

Options:
...
  --inspect-brk-node         will break in node's bootstrap code
                             (default: false)
...

Currently test are missing as I wanted to see if this is worth
pursuing first.
@danbev
squash: remove --inspect-brk-node help message
f367591
@danbev
danbev force-pushed the inspect-brk-node branch from a4f0bbd to f367591 Compare June 7, 2018 11:30
bnoordhuis
bnoordhuis approved these changes Jun 7, 2018
View reviewed changes
jasnell
jasnell approved these changes Jun 21, 2018
View reviewed changes
@danbev

danbev commented Jun 22, 2018

Copy link
Copy Markdown
Contributor Author

Landed in 9ca41e9.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danbev danbev closed this Jun 22, 2018
@danbev
danbev deleted the inspect-brk-node branch June 22, 2018 03:38
danbev added a commit that referenced this pull request Jun 22, 2018
@danbev
src: introduce inspect-brk-node
9ca41e9
This commit is a suggestion to add a new option to the node executable
to allow for breaking in node's javascript bootstrapper code.

Previously I've been able to set breakpoints in node bootstrapper code
and then restart the debugging session and those breakpoints would be
hit, but I don't seem to be able to do so anymore. Having this option
would allow me to use this option and then step through or add more
break points as needed.

PR-URL: #20819
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jun 22, 2018
@danbev @targos
src: introduce inspect-brk-node
75e07fe
This commit is a suggestion to add a new option to the node executable
to allow for breaking in node's javascript bootstrapper code.

Previously I've been able to set breakpoints in node bootstrapper code
and then restart the debugging session and those breakpoints would be
hit, but I don't seem to be able to do so anymore. Having this option
would allow me to use this option and then step through or add more
break points as needed.

PR-URL: #20819
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request Jul 3, 2018
v10.6.0 proposal #21629
Merged
@danbev danbev mentioned this pull request Mar 15, 2019
add internal documentation #26665
Closed
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina left review comments
@bnoordhuis bnoordhuis bnoordhuis approved these changes
@jasnell jasnell jasnell approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@danbev @bnoordhuis @eugeneo @BridgeAR @mcollina @jasnell @joyeecheung @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.