Skip to content
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

Mention chrome://inspect when using node --inspect #10410

Closed
mavericken opened this issue Dec 22, 2016 · 12 comments
Closed

Mention chrome://inspect when using node --inspect #10410

mavericken opened this issue Dec 22, 2016 · 12 comments
Labels
inspector Issues and PRs related to the V8 inspector protocol

Comments

@mavericken
Copy link

mavericken commented Dec 22, 2016

Version: v6.9.2
Platform: Windows 10 x64

When you do "node --inspect", it leads you to believe you should be debugging it through the URL it provides. I used it for a while, but it just buggy in general and doesn't work as well as a normal developer tools window. Luckily I discovered that I could do the same stuff but better with chrome://inspect. It would have saved me a lot of time if I found out about it sooner, so I feel that we should at least mention chrome://inspect in addition to the inspector.html URL.

C:\Windows\System32>node --inspect
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/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/28625829-4e38-4d76-aa23-73cd6a7903e4
>

Maybe it should be more like this:

C:\Windows\System32>node --inspect
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/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/28625829-4e38-4d76-aa23-73cd6a7903e4
You can also try chrome://inspect
>
@joyeecheung
Copy link
Member

I can confirm this works with the latest Chrome stable and node v6.9.2 on my mac. But, it doesn't work with Chrome Canary, and v7.3.0 doesn't work either. Neither does the current Node master build work with Chrome stable/Canary.

Platform: Darwin Kernel Version 15.6.0

@cjihrig
Copy link
Contributor

cjihrig commented Dec 22, 2016

There was previous discussion that printing anything Chrome/DevTools specific isn't exactly fair to other debugging tools. This would be making that issue even worse IMO.

@joyeecheung
Copy link
Member

Just did a little investigation and I think it's Chromium that breaks this feature(looks like it's trying to launch the wrong URL when you click inspect). I think Node has updated the protocol but Chromium's chrome://inspect doesn't. This bug on the chromium issue tracker looks related. Maybe should not prompt for chrome://inspect until it's fixed?

cc/ @eugeneo

@joyeecheung
Copy link
Member

@cjihrig Ah, but maybe we could mention this in the docs?

@cjihrig
Copy link
Contributor

cjihrig commented Dec 22, 2016

I'd be fine with docs. Or even a wiki page (I know no one ever looks there) where any number of vendors can add instructions for their debugger.

@gibfahn
Copy link
Member

gibfahn commented Dec 22, 2016

Relevant discussion was at #8978 (and previously #7182)

@eugeneo
Copy link
Contributor

eugeneo commented Dec 22, 2016

  1. chrome://inspect seems to be broken in Chrome 55 (I am not sure what happened) - but 56 seems to be ok. So it looks like chrome://inspect should not be surfaced at least for now...
  2. Preferred way of connecting to Node.JS from Chrome DevTools will be from within the DevTools themselves (this blog entry - https://blog.hospodarets.com/nodejs-debugging-in-chrome-devtools - explains it). I still need to implement the UI on the devtools side to provide port customization.

@joyeecheung
Copy link
Member

@gibfahn Thanks for the links. I think the problems in this issue can all be deferred to/solved by #8978?

@mscdex mscdex added the inspector Issues and PRs related to the V8 inspector protocol label Dec 22, 2016
@mavericken
Copy link
Author

Maybe instead of mentioning specific services in the node console, it should instead provide a link to documentation describing all the ways to use it. I think the main problem here is that the chrome-devtools link gives off the impression that it is the only way to use it, when in fact better ways exist that a new user would not know about.

@joyeecheung
Copy link
Member

@mavericken I think what you described is exactly what #8978 does, isn't it? :D

@mavericken
Copy link
Author

Ah so it does. This issue is basically a duplicate then so I'll close.

@joshgav
Copy link
Contributor

joshgav commented Feb 6, 2017

@mavericken would be great to get your feedback on nodejs/nodejs.org#1131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

No branches or pull requests

7 participants