-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: update --inspect hint text #11207
Conversation
src/inspector_socket_server.cc
Outdated
|
||
fprintf(out, "\nFor more info go to %s\n\n", GUIDE_URL); | ||
|
||
fprintf(out, MapsToString(this->GetListResponse()).c_str()); |
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 just fprintf(out, "http://%s:%d/json/list", this->host().c_str(), this->port());
instead of printing the whole response?
This seems noisy (both the output and the diff). Users almost certainly will never care about the array at the end. Couldn't you just add the piece that links to the debugging guide? |
Sure, my goal in the initial commit was to share a few options for review. A tricky part is that users may need the UUID or full |
I think we should at least keep both the the documentation link and the chrome URL. Also, we should err on the side of providing more help, even if it is at the cost of being too verbose. I have an idea I am reluctant to mention because I feel it would be overkill, but I'll do it anyways. If we want to eliminate noise and be helpful, a solution would be to link to a single HTML page ( perhaps with URL parameters) which displays any dynamic links or configurations for various tools. |
One observation I made was that people seem to be unaware of the automatic links in |
Do we want to update this PR and remove the experimental warnings or would that require another PR? |
@jkrems I'll update this one in next couple days, thanks! |
422f005
to
277ff59
Compare
@jkrems @ofrobots @eugeneo updated to an official proposal, PTAL. This is per next steps in Diag WG meeting: https://github.com/nodejs/diagnostics/blob/master/wg-meetings/2017-03-23.md#wip-inspector-hint-text-update-11207 This removes the Thanks! |
Chrome DevTools are looking at different options to help the users start debugging the Node (e.g. shorter/bookmarkable URL, easier discovery, etc) but there is no immediate solution that would be more convenient to copying the URL from the console to the browser address bar. Even to copy/pasting the WS URL to chrome://inspect requires the users to read the guide and remember "chrome://inspect" URL itself. It is an extra step whenever the Node is restarted - and judging from the UUID introduction, this will be even bigger pain. Removing the URL at this time will definitely break the workflow of many users. I believe it should be kept it a smoother workflow is implemented and is deployed in Chrome stable... |
My personal vote would be for the (*) I have a particular bias against the DevTools URL because I keep hearing people complain about having to copy and paste the URL on every restart. They think it's the "normal"/"suggested"/"official" workflow and so they don't check the docs for better ways. I'd rather not keep re-posting the same answers to even more developers... ;) |
@Trott @nodejs/ctc the following is where your opinions would be helpful, thanks! I think you can reflect these via approvals to this PR and/or rejections and comments in this thread. I tagged ctc-agenda cause I think a brief live discussion would be helpful. There's a possibility I might miss the meeting today cause of travel 😞 (will be back more consistently starting next week!), @jkrems any possibility you could attend the CTC meeting today as well to help explain if needed? Thanks! Without further ado 😉 here's that explanation: The current hint text (in master) is:
The hint text proposed in this PR is:
The main questions to be reviewed by the CTC are:
My opinion is that the message proposed in this PR is easier to read and understand, mostly avoids the >80 column overflow with the long chrome-devtools URL, (see e.g. #7141) and provides enough information to get started without being overly verbose. Although the extra Removing the Including the UUID in the default output will also be helpful to some users, see #11496, #11701, #9185, and #10578. For the same reason prepending the scheme (i.e. Since Inspector is just now emerging from experimental status this change isn't yet semver-major, but I think it would be after 8.0.0, so want to land this before the final release, one of the reasons I tagged ctc-agenda. Thanks for your help! |
5f01c9c
to
85ad573
Compare
Cherry-picked update to node-inspect landed in #12363. New CI: https://ci.nodejs.org/job/node-test-pull-request/7516/ |
I'm +1 on the proposed changed hint text in this PR. |
@joshgav I could join for the first couple of minutes but have some conflicting meetings. With the delay of the release (and some CTC members already chiming in here) it seems less urgent..? |
Maybe we can get |
+1. The debugging_getting_started guide indeed seem to be a big wall of text. A different doc with very clear links to how to open various different debuggers (VSCode, DevTools, etc.) would be a lot more usable. |
From the @nodejs/website perspective, https://nodejs.org/en/docs/inspector might be slightly better information architecture than https://nodejs.org/en/inspector. Either is 👍 by me, FWIW. |
I'm +1 for something like https://nodejs.org/en/docs/inspector. Seems better than the guide. |
* Removes "experimental" warning. * Prints ws://_ip_:_port_:/_uuid_ for all IDs. * Refers to nodejs.org guide for more details. PR-URL: nodejs#11207 Reviewed-By: _tbd_ Reviewed-By: _tbd_
85ad573
to
5c9335a
Compare
Removed lots of text from the doc per @ofrobots' feedback and moved to https://nodejs.org/en/docs/inspector in nodejs/nodejs.org#1216, PTAL. Updated link in this PR too. I'll land this once the updated doc lands in nodejs.org. If any are still opposed please comment now! |
Thanks all. This PR landed in 6ade7f3. The docs PR landed in nodejs/nodejs.org@13eaf4c |
* Removes "experimental" warning. * Prints ws://_ip_:_port_:/_uuid_ for all IDs. * Refers to nodejs.org guide for more details. PR-URL: #11207 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
PR-URL: #1216 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jan Krems <[email protected]>
* Removes "experimental" warning. * Prints ws://_ip_:_port_:/_uuid_ for all IDs. * Refers to nodejs.org guide for more details. PR-URL: nodejs#11207 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src, inspector
ws://_ip_:_port_:/_uuid_
for all IDs.Output is:
/cc @nodejs/diagnostics