-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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: skip promise hook in the inspector async hook #57148
base: main
Are you sure you want to change the base?
Conversation
Instead of filtering out promises in the async hooks added for async task tracking, add an internal path to skip adding the promise hook completely for the inspector async hook. The actual user-land promise tracking is already handled by V8 inspector. This prevents the internal promise hook from showing up and creating unnecessary noise when stepping into async execution in the inspector.
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 modulo the lint issue
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57148 +/- ##
==========================================
+ Coverage 89.02% 90.37% +1.35%
==========================================
Files 665 628 -37
Lines 193408 184042 -9366
Branches 37270 35951 -1319
==========================================
- Hits 172181 166335 -5846
+ Misses 13888 10876 -3012
+ Partials 7339 6831 -508
|
Looks like I forgot to stage the symbol definition before I pushed (the undefined symbol still worked after destruction because..it will just get coerced to |
This significant improves breakpoint experience! @joyeecheung please correct me if i'm wrong -- even though it is linked in the OP, this does not fix https://issues.chromium.org/issues/390581540 that devtools can not autocomplete in the console, right? For the autocomplete issue, there was an issue #56637 (comment) as well that V8 in Node.js assumes all devtools scripts failed side-effect check. |
Yes, this is just an adjacent issue to the autocomplete issue in DevTools (that might interfere with debugging the actual issue, I suppose). |
I've been wanting this for years. Thank you! |
Instead of filtering out promises in the async hooks added for async task tracking, add an internal path to skip adding the promise hook completely for the inspector async hook. The actual user-land promise tracking is already handled by V8 inspector. This prevents the internal promise hook from showing up and creating unnecessary noise when stepping into async execution in the inspector.
Refs: https://issues.chromium.org/issues/390581540
Quoting myself from the DevTools issue:
When running
node --inspect-brk await.mjs
on this snippetPreviously, this is what you'd see in the Chrome DevTools
After this patch