-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
doc: add example for running with v8-inspector #8845
Conversation
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.
LGTM, thank you!
@@ -193,4 +193,13 @@ e.g. `--inspect=9222` will accept DevTools connections on port 9222. | |||
To break on the first line of the application code, provide the `--debug-brk` | |||
flag in addition to `--inspect`. | |||
|
|||
```txt | |||
$ ./node --inspect index.js |
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.
nit: I guess “normal” users don’t call it with the ./
? 😄
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.
Thanks, fixed :)
@@ -193,4 +193,13 @@ e.g. `--inspect=9222` will accept DevTools connections on port 9222. | |||
To break on the first line of the application code, provide the `--debug-brk` | |||
flag in addition to `--inspect`. | |||
|
|||
```txt | |||
$ ./node --inspect index.js |
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.
Nit: I would just use node
without ./
. It's unlikely that there is a node executable in the folder where the command is run.
Edit: @addaleax won the race condition here 😄.
Debugger listening on port 9229. | ||
Warning: This is an experimental feature and could change at any time. | ||
To start debugging, open the following URL in Chrome: | ||
chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6a |
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.
Nit: maybe it's better to not split this line as it is a URL. I'm not sure though because if it isn't split scrolling is required on small screens.
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.
Changed, no line break in url.
072e6b1
to
467b753
Compare
@fhinkel while you are at it s/Add/add/ in the first line of commit message. |
Add example to show what running Node.js with `--inspect` should look like. Some IDEs do not show the link when running with `--inspect`. This example hints to what the full output looks like.
467b753
to
0c406a1
Compare
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.
LGTM
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.
LGTM, but maybe this should go after the first paragraph of the V8 inspector section.
wasn't one of the reasons for not documenting it because it was an experimental feature? /cc @nodejs/ctc I'm not neccessarily opposed to this, but I do think we should be careful about the support story in experimental features |
It's already documented, and comes with a big bold warning that it's experimental. I don't think this PR adds any additional support commitment. |
I retract my original statement then. This example is a great thing to include LGTM |
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.
LGTM! :)
LGTM |
Add example to show what running Node.js with `--inspect` should look like. Some IDEs do not show the link when running with `--inspect`. This example hints to what the full output looks like. PR-URL: #8845 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Landed in bdb8012. Thank you! |
Add example to show what running Node.js with `--inspect` should look like. Some IDEs do not show the link when running with `--inspect`. This example hints to what the full output looks like. PR-URL: #8845 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Add example to show what running Node.js with `--inspect` should look like. Some IDEs do not show the link when running with `--inspect`. This example hints to what the full output looks like. PR-URL: #8845 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Checklist
make -j8 test
(UNIX) passesAffected core subsystem(s)
doc debugger
Description of change
Add example to show what running Node.js with
--inspect
should look like.
Some IDEs do not show the link when running with
--inspect
.This example hints to what the full output looks like.