Version
v17.7.2
Platform
Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
$ node inspect index.js
debug> exec new Map()
{ size: 0 }
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The output should be the same as util.inspect(new Map()), which means
$ node inspect index.js
debug> exec new Map()
Map(0) {}
What do you see instead?
$ node inspect index.js
debug> exec new Map()
{ size: 0 }
Additional information
This is caused by RemoteObject not considering Map object (and also Set object).
https://github.com/nodejs/node/blob/master/lib/internal/debugger/inspect_repl.js#L236-L249
I'd like to send a PR that fixes this problem if ok.
Version
v17.7.2
Platform
Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The output should be the same as
util.inspect(new Map()), which meansWhat do you see instead?
Additional information
This is caused by
RemoteObjectnot considering Map object (and also Set object).https://github.com/nodejs/node/blob/master/lib/internal/debugger/inspect_repl.js#L236-L249
I'd like to send a PR that fixes this problem if ok.