Title: inspector: skip promise hook in the inspector async hook by joyeecheung · Pull Request #57148 · nodejs/node · GitHub
Open Graph Title: inspector: skip promise hook in the inspector async hook by joyeecheung · Pull Request #57148 · nodejs/node
X Title: inspector: skip promise hook in the inspector async hook by joyeecheung · Pull Request #57148 · nodejs/node
Description: 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: From some code archeology my guess is: Node.js uses its own async hooks to call asyncTaskScheduled for all the async tasks so that they show up in the inspector #13870 The Node.js async hooks implementation unconditionally adds Promise hooks because the API is designed in a way that allows all promises to pass through the hook (with resource type being "Promise" that allows users to filter through) The implementation in 1 does not actually need the promise hooks unconditionally set in 2. In fact it is counter-productive as Node.js needs to filter them out to avoid extra counting in the inspector #17118 I think it can probably be cleaned up by just carving out some internal path in the Node.js async hooks implementation to skip that useless promise hook. When running node --inspect-brk await.mjs on this snippet const test = await Promise.resolve('test') console.log(test); Previously, this is what you'd see in the Chrome DevTools After this patch
Open Graph Description: 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-lan...
X Description: 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-lan...
Opengraph URL: https://github.com/nodejs/node/pull/57148
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d8971baf-ac86-eb71-5fed-c4f86e4dc5de |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E546:150C3:BDF7BD:1035D48:6A4C929A |
| html-safe-nonce | 19ea8ab3001b451b0fd83505dbb5acb52e7d137f36ec080cc1ee06699f69e9ad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTQ2OjE1MEMzOkJERjdCRDoxMDM1RDQ4OjZBNEM5MjlBIiwidmlzaXRvcl9pZCI6Ijc5NjU4OTg3NjM2MjAwOTQ2MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a51cc593fcafc723d5484d01942ff9c482872742a7b265a15c2fa470a806b984 |
| hovercard-subject-tag | pull_request:2347357231 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/57148/files |
| twitter:image | https://avatars.githubusercontent.com/u/4299420?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4299420?s=400&v=4 |
| og:image:alt | 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-lan... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width