-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
Inconsistent inspector output of exec new Map() #42405
Copy link
Copy link
Closed
Labels
debuggerIssues and PRs related to the debugger subsystem.Issues and PRs related to the debugger subsystem.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
debuggerIssues and PRs related to the debugger subsystem.Issues and PRs related to the debugger subsystem.