-
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
inspector: use js_app.html as the landing page for chrome devtools #21385
Conversation
I had a look at the run
But it says -
I'm not sure why it's failing. Anything for me to fix for this patch? |
@GauthamBanasandra It's a bit buried, but the test failure is in https://ci.nodejs.org/job/node-test-binary-windows/18091/COMPILED_BY=vs2017,RUNNER=win2008r2-vs2017,RUN_SUBSET=2/console. Here it is: not ok 296 parallel/test-message-channel
---
duration_ms: 120.96
severity: fail
exitcode: 1
stack: |-
timeout I suspect it is unrelated to your change here. Re-running CI via "Resume Build" (so it just re-runs the subtasks that failed rather than a full CI re-run): https://ci.nodejs.org/job/node-test-pull-request/15519/ |
7fe9b0c
to
fa9da9c
Compare
Is this good for merge? All checks have passed. |
сс @nodejs/v8-inspector |
@GauthamBanasandra It needs to remain open for 48 hours and be approved by at least one Collaborator before it can be merged. |
cc @nodejs/diagnostics |
Wouldn't this make |
fa9da9c
to
845ed4c
Compare
@mmarchini Thanks for the catch. I don't think Google officially supports downloading previous versions of the Chrome browser. However, one could do so with Chromium. So, here's the change that I've made to address this - [ {
"description": "node.js instance",
"devtoolsFrontendUrl": "chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=localhost:9229/3b418c47-4d5c-4e61-bf83-9f63866be5dc",
"devtoolsFrontendUrlCompat": "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:9229/3b418c47-4d5c-4e61-bf83-9f63866be5dc",
"faviconUrl": "https://nodejs.org/static/favicon.ico",
"id": "3b418c47-4d5c-4e61-bf83-9f63866be5dc",
"title": "input.js",
"type": "node",
"url": "file:///Users/gautham/projects/github/chromium/debug-srcmap/input.js",
"webSocketDebuggerUrl": "ws://localhost:9229/3b418c47-4d5c-4e61-bf83-9f63866be5dc"
} ] So, |
Folks, does my change look ok? Please let me know if any more changes need to be done for this patch. |
src/inspector_socket_server.cc
Outdated
const std::string &formatted_address) { | ||
std::ostringstream frontend_url; | ||
frontend_url << "chrome-devtools://devtools/bundled/"; | ||
frontend_url << (is_compat?"inspector":"js_app"); |
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: spaces between the ternary operators (e.g. is_compat ? "inspector" : "js_app"
)
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.
Done.
doc/api/debugger.md
Outdated
``` | ||
|
||
(In the example above, the UUID dc9010dd-f8b8-4ac5-a510-c1a114ec7d29 | ||
at the end of the URL is generated on the fly, it varies in different | ||
debugging sessions.) | ||
|
||
> If the Chrome browser is older than <strong>66.0.3345.0</strong>, |
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: There's no need for the leading >
here.
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.
Also no need for <strong>
. Would prefer markdown for emphasis, but honestly, no emphasis is needed here.
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.
Done.
doc/api/debugger.md
Outdated
``` | ||
|
||
(In the example above, the UUID dc9010dd-f8b8-4ac5-a510-c1a114ec7d29 | ||
at the end of the URL is generated on the fly, it varies in different | ||
debugging sessions.) | ||
|
||
> If the Chrome browser is older than <strong>66.0.3345.0</strong>, | ||
>use `inspector.html` instead of `js_app.html` in the above URL. |
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.
Would chrome://inspect
work in all versions? If so, maybe it's easier to recommend using that URL than doing string substitution on the URL.
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.
Left some comments on the docs, but nothing that should be considered blocking. Would be good to get a review or two in from @nodejs/diagnostics and/or @nodejs/v8-inspector. Ping! |
As of this commit in chromium - https://chromium-review.googlesource.com/c/chromium/src/+/905450 a new landing page (js_app.html) has been added and inspector.html has been made as the fallback page. Another motivation for this patch is the following bug in chromium - https://bugs.chromium.org/p/chromium/issues/detail?id=846642 due to which, source maps won't get applied with inspector.html, but works with js_app.html In order to maintain compatibility, this patch adds a URL "devtoolsFrontendUrlCompat" to the response of /json/list REST API so that those using Chrome browsers older than 66.0.3345.0 could use this to open DevTools.
845ed4c
to
93402aa
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.
On chrome://inspect page we already use js_app.html for Node.js targets so this PR looks good to me.
/ping @jkrems Looks good from 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.
Wouldn't this make
node inspect
open a page that doesn't exist on previous versions of Chrome?
node inspect
doesn't really care about this URL, it only cares about the websocket URL. This change LGTM.
Landed in 026d279, thanks for your contribution! 🎉🎉🎉🎉🎉🎉 |
As of this commit in chromium - https://chromium-review.googlesource.com/c/chromium/src/+/905450 a new landing page (js_app.html) has been added and inspector.html has been made as the fallback page. Another motivation for this patch is the following bug in chromium - https://bugs.chromium.org/p/chromium/issues/detail?id=846642 due to which, source maps won't get applied with inspector.html, but works with js_app.html In order to maintain compatibility, this patch adds a URL "devtoolsFrontendUrlCompat" to the response of /json/list REST API so that those using Chrome browsers older than 66.0.3345.0 could use this to open DevTools. PR-URL: #21385 Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=846642 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/905450 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
Thank you all :) |
As of this commit in chromium - https://chromium-review.googlesource.com/c/chromium/src/+/905450 a new landing page (js_app.html) has been added and inspector.html has been made as the fallback page. Another motivation for this patch is the following bug in chromium - https://bugs.chromium.org/p/chromium/issues/detail?id=846642 due to which, source maps won't get applied with inspector.html, but works with js_app.html In order to maintain compatibility, this patch adds a URL "devtoolsFrontendUrlCompat" to the response of /json/list REST API so that those using Chrome browsers older than 66.0.3345.0 could use this to open DevTools. PR-URL: #21385 Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=846642 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/905450 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
* As per nodejs/node#21385 and https://chromium.googlesource.com/chromium/src/+/f7efc442c8dc9108f057144983987e74ddc6a0d4 we need to use js_app.html instead of inspector.html * This patch also fixes the inconsistency in symbol mapping caused due to adding handler headers. Change-Id: I1427742f5305a0c71b722c3e6d699ea4b5c0ebf0 Reviewed-on: http://review.couchbase.org/96315 Reviewed-by: Sriram Melkote <siri@couchbase.com> Reviewed-by: CI Bot Tested-by: Gautham B A <gautham.bangalore@gmail.com>
* As per nodejs/node#21385 and https://chromium.googlesource.com/chromium/src/+/f7efc442c8dc9108f057144983987e74ddc6a0d4 we need to use js_app.html instead of inspector.html * This patch also fixes the inconsistency in symbol mapping caused due to adding handler headers. Change-Id: I23884175d7e8ce9fa798869659b44ba2a0ee0dca Reviewed-on: http://review.couchbase.org/97722 Well-Formed: Build Bot <build@couchbase.com> Reviewed-by: Sriram Melkote <siri@couchbase.com> Tested-by: Gautham B A <gautham.bangalore@gmail.com>
As of this commit in chromium -
https://chromium-review.googlesource.com/c/chromium/src/+/905450
a new landing page (js_app.html) has been added and the existing
inspector.html has been made as the fallback page.
Another motivation for this patch is the following bug in
chromium -
https://bugs.chromium.org/p/chromium/issues/detail?id=846642
due to which, source maps won't get applied with inspector.html,
but works with js_app.html
In order to maintain compatibility, this patch adds a URL
"devtoolsFrontendUrlCompat" to the response of /json/list REST API
so that those using Chrome browsers older than 66.0.3345.0
could use this to open DevTools.
Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=846642
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/905450
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes