microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.72k stars 29.46k forks source link

Debug Repl: output of same value no longer aggregated #27856

Closed bpasero closed 7 years ago

bpasero commented 7 years ago

I am not sure when we lost support for this but we used to show a little number next to the output if the output was identical to the previous output, much like Chrome console works:

image

I am no longer seeing this in the repl:

image

isidorn commented 7 years ago

Please note that in your picture you are outputing an object which we never supported. Though what you are doing in chrome picture should work

for (var i = 0; i < 20; i++) {
    console.log("Hello world");
}
weinand commented 7 years ago

running the for loop from above with the "legacy" protocol results in this: 2017-06-28_16-17-44

running it with "inspector" protocol in this: 2017-06-28_16-19-01

reopening.

isidorn commented 7 years ago

The issue is how the events are coming from the node extensions, the following sample shows that everything is fine on the vsocde side

setInterval(() => {
    console.log("Hello world");

}, 50)

However the legacy adapter seems to append different pieces together when they are happening shortly afterwards. I do not plan to fix this on the vscode side as I would have to split the output which is coming together by newlines which would bring me some other pain. @weinand if you want you can tackle it on the adapter side, closing this as I plan to take no action

weinand commented 7 years ago

I'm in favour of disabling this feature for now because it does not provide a user experience that is understandable. Why are identical strings sometimes aggregated and sometimes they are not?

Compare the console in Chrome Dev Tools with both VS Code protocols to understand what I mean.

E.g. compare the output of this snippet in the "inspector" protocol and Chrome Dev Tools:

for (var i = 0; i < 20; i++) {
    console.log("Hello\nWorld");
}

I'm not asking to fix this, but we should disable it.

isidorn commented 7 years ago

I am fine disabling it. @bpasero objections?

bpasero commented 7 years ago

No objections as I am not using this feature. Btw I verified this using extension debugging where it seems to work fine.

isidorn commented 7 years ago

To verify: quickly try out if the repl properly shows strings sent from the adapter. And verify it does not concatanate them

bpasero commented 7 years ago

Verified for EH debugging.