debugger: Fix inconsistent inspector output of exec new Map()#42423
debugger: Fix inconsistent inspector output of exec new Map()#42423nodejs-github-bot merged 1 commit intonodejs:masterfrom
exec new Map()#42423Conversation
hybrist
left a comment
There was a problem hiding this comment.
Thanks for fixing this! I like the new split here, just one nit/question.
exec new Map()exec new Map()
|
The way these three commits are organized, the first commit adds a test that fails. This will break |
|
@Trott I squashed them into the one. |
| throw error; | ||
| } | ||
|
|
||
| cli.waitForInitialBreak() |
There was a problem hiding this comment.
oy... rather than a long chain of thens... can we convert this into an async function with awaits please?
|
I think |
Most of them are. Maybe this one should be too. The ones in |
|
Landed in f890ef5 |
PR-URL: #42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs/node#42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Fixed #42405
The output string of
execcommand is fromRemoteObject[customInspectSymbol], but currently it doesn't support some object types such asMapandSet, which leads to invalid string representations (#42405).This PR implemented string representations when
RemoteObject.subtypeissetandmap.RemoteObjecthas their abbreviation asObjectPreviewinRemoteObject.preview, which means we can construct their string representation fromObjectPreview.For example,
new Set([ {a: 1}, new Set([1]) ])is a RemoteObject that has two ObjectPreviews ({a: 1}andnew Set([1])).String representation of ObjectPreview
{a: 1}will be{a: 1}andnew Set([1])will beSet(1) { ... }. (Note that ObjectPreview treats an object nested in two or more layers as overflow, so overflowed object is converted to{ ... })1d0da48 added test cases for object type RemoteObject
7820dd4 added
ObjectPreviewandPropertyPreview. And current string representation logics are ported to them.5a4f767 fixed string representations of
MapandSet.