-
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
Find an alternative to V8's Debug Mirror API for util.inspect #11875
Comments
The functionality you are looking for are exposed directly in the V8 API. Take a look at v8::Map, v8::Set, and v8::Promise. No need to go through the inspector. |
@ofrobots already has an eye on this afaik. |
Ahh I was only looking at the Either way I'm glad there's someone on top of this already. |
I guess we could consider adding an API for Map- and SetIterators. Then again, the inspector actually also offers the set of functionality you are looking for. Take a look at this inspector test and its expected result. |
Yes, I have been tracking the migration of the Debug context. The idea that either we can start using bona fide V8 apis (e.g. to inspect promises) or use the inspector in-process. The latter depends on the inspector being available in-process to JavaScript, which is dependent on a few changes, the first of which is #11431, which is currently blocked on reviews. |
PR-URL: nodejs#12254 Refs: nodejs#11875 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
This should remain open? |
An alternative to |
Currently we are able to display certain hidden properties of objects from
util.inspect
through the V8 debug context'sMakeMirror
:node/lib/util.js
Lines 287 to 288 in e296ffb
node/lib/util.js
Lines 739 to 741 in e296ffb
While it works just fine currently, the V8 debugger API will be deprecated in V8 5.9 in favor of the v8 inspector API. We'll need to find a way to use the inspector API for this purpose.
/cc @nodejs/v8
The text was updated successfully, but these errors were encountered: