-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Update inspector ready message to be vendor agnostic #7182
Conversation
Update inspector ready message to be vendor agnostic.
I like the idea behind this change, but it seems that the only information this will give individuals is the port that the process is running on. Without the specific link it is not easy / intuitive to get a debugging session running. When this feature is officially supported it will definitely be worthwhile to have a more vendor neutral link printed... but as it is this change seems like it will only make things more difficult for individuals. to be fair this pain can be solved through documentation, but for now the decision has been to leave the feature undocumented while it is unstable |
@thealphanerd The console message could easily be updated to output the HTTP JSON endpoint I see this discussion to be more of a principle one: Whether the Node community want to prefer one tooling vendor over another, and ultimately what provides the best debugging experience for Node users. |
@auchenberg that still makes an extra step for people to get up and running with the debugger today, and it isn't exactly intuitive. There are rumblings right now in nodejs/diagnostics#46 about expanding the scope of the wg to a diagnostics WG that would include debugging under its umbrella. I highly suggest chiming in there and joining the discussion. We are trying to get together as many stakeholders from various organizations to make sure that all concerns (such as this one) are being thought about and considered. FWIW I completely agree that it should be vendor neutral when it is officially supported, I just think that the approach in this PR reduces usability and I'm unsure how we would properly let me know how to use the feature otherwise |
If I may be so bold, I suggest we agree that the text should be updated to be more vendor-agnostic prior to including In fact, if the only helpful instructions require something specific to Chrome DevTools, that's likely an indicator that we don't yet have enough ecosystem support to ship. @ofrobots, can you all think about this too? We should strive for instructions which are short yet helpful and apply to all tools equally. |
@joshgav one potential solution would be an "unofficial" guide, perhaps even a wiki. A place where each vendor can keep up to date instructions on how to use the debugger with their debugging tools. Perhaps something in the same vein as https://nodejs.org/en/docs/es6/ edit: the idea being that the print out can post to that resource |
@thealphanerd makes sense, perhaps we should start that in the debugging section of nodejs/tracing-wg after merging nodejs/diagnostics#47? |
So we would now have to "figure out" the url to use with chrome? I feel like this makes it a lot less user friendly at this point... I am -1 on the pr as it stands now |
@thealphanerd Indeed change makes it less intuitive from developers to debug node, as it decouples the new Chrome Debugging endpoint provided by v8_inspector, from a specific front-end, Chrome DevTools, and brings back Node to be vendor natural. The suggestion is that Node core should be kept vendor agnostic, and each vendor should be providing a CLI or similar that integrates wide Node to provide an intuitive experience. Such CLI is suggested above and could easily be built. These front-end specific integrations could easily be listed in a Wiki page or similar. Before: After:
|
I made a really simple Chrome extension that opens Chrome's DevTools with V8 Inspector, given only the port as input - https://github.com/continuationlabs/node-v8-inspector Is that a route we could explore? |
Thanks @auchenberg. +1 for vendor agnostic There are many potential node debugging front ends. Mozilla is making debugging node a first class citizen of the new Firefox debugger. |
-1, decreases usability and discoverability. An acceptable change might be printing a second line that says "If you are using a different debugger, connect to this address: |
We don't exactly have a plethora of tools that can talk this yet right? Until we get to the point where people can make a choice of "preferred debugging tool" that isn't just DevTools then -1 from me and we can revisit this a little later. For now the priority is to get people using this so we can perfect it. |
@thealphanerd @joshgav Did you move forward with the vendor agnostic tooling and CDP discussion in the new Diagnostics WG? |
@rvagg Today the community already have debuggers from Microsoft (in VS Code), and Jetbrains (in WebStorm) that are compatible with the new CDP endpoint exposed by @bnoordhuis @evanlucas The assumption of If we there was a PR submitted that changed the inspector ready message to contain a Visual Studio Code specific URL that required VS Code to be installed (available and open sourced on all platforms like Chrome), would such a change be accepted? What tooling front-end should be favored? The existing V8 protocol endpoint doesn't favor one tool over other tools, and I don't see why |
@auchenberg can you point me to some documentation on how to utilize the debugger exposed by v8_inspector in vscode? I have not used it and feel that using it could help me understand your side a little better. Thanks! |
@evanlucas See https://github.com/auchenberg/node-v8-inspector-vscode-sample, and notice 3rd party tools are currently blocked by #7227 |
@auchenberg thanks |
@auchenberg This is a good conversation to bring to nodejs/diagnostics now; see nodejs/diagnostics#52 for a related issue. It would also be great to add a page in that repo describing how to use VS Code with v8_inspector; maybe @jasonLaster can do the same for Firefox Debug Tools. I think the key point in this conversation is that the hint message for |
thanks for the info @auchenberg, useful to know.
yes, +1 to this |
Do we have anyone from Jetbrains involved in the diagnostics group? Does anyone have a contact there we could reach out to? |
@rvagg > Do we have anyone from Jetbrains I'm working on this starting with an indirect contact. |
/cc @denofevil for WebStorm |
I do. I'm not convinced by the arguments made so far. Also:
Problem solved, no? |
Thanks, @pavelfeldman! |
update: I missed I don't have any objections to current message. Because:
|
I was always saying that debugging ergonomics concerns were up to the Node community. |
I don't feel that way at all. I was the main reviewer for the inspector pull request and I work for IBM. |
First, I'm sorry you find my comment offensive as that wasn't my intention. Secondly I'm raising this concern exactly to let the community decide as the question of a specific tooling recommendation is more of a strategic/political decision than technical. The technical part of adding the Chrome Debugging protocol to Node had landed, and it's wonderful for the broader tooling ecosystem, and I'm sure everyone involved in this debate highly appreciates the efforts Google has put into making this happen. I do at least! The above concerns has been raised, and in the above comment I've tried to provide an overview of the current opinions and pro/cons. I'm unsure on how concerns like these are addressed by the Node community and how the decision process for such things is. I've stated the concerns of recommending one specific tool directly from |
@auchenberg I think we should just apply some patience here, we have some runway here because it's still in experimental form. I'm pretty confident that by the time we're ready to call it an official feature of Node.js that we may have broad enough agreement to update the message to be at least a little more agnostic. For now it reflects an easy path for users to get up and running with this feature and providing feedback for us. I'm tagging this PR as part of the 7.0.0 milestone as it may tie in well with the decision whether to move forward with this into v6 LTS or not. How about we just let this brew for a while and our understanding and feelings about this feature will evolve. |
Ping...is this still something we want for v7? |
Thanks for the ping @jasnell. To best reflect our intended open, vendor-agnostic platform, I think we should figure out how to make the message helpful and immediately actionable without referencing Chrome/V8-specific details. Will review this thread and think about next week and round up a suggestion or two from our crew here at MS. |
@joshgav ... just a heads up that I'm planning to cut the v7.x branch on Monday. This change doesn't need to land before then but it would be good to have an idea of which way this is heading. |
From the CTC meetining sounded like @joshgav had a update for here. Are we still on track / aiming for v7 for this one? |
We arrived at three options in the Diag WG meeting (notes here):
We settled on 2 for now as the easiest to implement, with 3 as a long-term goal. FWIW, this isn't blocking for v7 and won't be a breaking change in the future, but it would be nice to have it updated before release. I hope to write up the initial page in the next few days... /cc @nodejs/diagnostics |
/shamelessplug Since this is going to make it a little more difficult to start a debugging session, I made a chrome extension that lets you save configured debuggers and will even tell you if they're online. That way I don't have to copy + paste a bunch of urls all the time. We also use Node in a microservice + docker ecosystem so we need to keep track of a bunch of preconfigured ports everywhere. The link is here: |
@danwkennedy cool! Can you point us to the source for that extension? BTW - I think we should close this issue now in deference to the fresh start at #8978 |
@joshgav: The source for the extension is here: https://github.com/danwkennedy/node-debugger I'm also working on a longer blog post that will explain our workflow and how the extension fits into it. That'll take a little longer, though. |
Checking in on this. We're a week out from the v7 release. This would need to be rebased and updated this week in order to land for that. |
c133999
to
83c7a88
Compare
ok. thanks for the heads up |
Updates hint text for --inspect to be more generic. Instructions for various debugger clients moved into a referenced guide. PR-URL: nodejs#8978 Fixes: nodejs#7182 Reviewed-By: <tbd> Reviewed-By: <tbd>
Checklist
Affected core subsystem(s)
v8inspector
Description of change
Per concern raised in Add v8_inspector support, this PR updates the inspector ready message to be vendor agnostic, and removes the Chrome DevTools specific URL, that requires Node users to install and use Chrome as the preferred debugging tool.
Principle behind
The principle for this change, is that Node as a runtime, shouldn't favor one debugging tool or vendor, but the --inspect flag should simply expose a generic debugging endpoint that's discoverable by tools such as Chrome DevTools, Node-inspector, VS Code and others.
It's a fact that Chrome is cross platform browser and could be installed for potentially all node users, but the same argument can be used for other debugging tools such as VS Code, Sublime and others, and those tools aren't being favored by Node, so neither should Chrome DevTools.
If the argument is the convenience, this could just be achieved by Google or any other vendor providing a CLI that launches
node --inspect
and launches the specific tool connecting to the specific node process.Think
node-chrome-debug index.js
->node --inspect index.js
+opens chrome-devtools://devtools/
in Chrome. Collaboration with the node-inspector could be an ideal candidate for this.(Ping @boneskull, @ofrobots, @pavelfeldman, @joshgav, @rvagg)