eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.07k stars 2.5k forks source link

[debug console] Copying all debug console text only copies text in view #6093

Open thegecko opened 5 years ago

thegecko commented 5 years ago

Description

When copying all text in the debug console, only a partial copy is made to the clipboard. It seems this is only copying the text in view.

Reproduction Steps

Create a noddy program with lots of output, e.g.:

var x = 30;
for (var i = 0; i < x; i ++) {
    console.log("message " + i);
}

Debug this program and select all in the debug console output.

Screenshot 2019-09-03 at 10 47 47

Use the context menu to copy the selection and paste it somewhere.

Observe the pasted output is truncated. e.g. copying when scrolled to the top produces:

/Users/thegecko/.nvm/versions/node/v10.16.0/bin/node --inspect-brk=45088 debug/test.js 
Debugger listening on ws://127.0.0.1:45088/6ba792fd-2c84-4ecb-ba4c-e9b9dcd76faa
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
message 0
message 1
message 2
message 3
message 4
message 5
message 6
message 7
message 8
message 9
message 10

And when scrolled to the bottom produces:

message 15
message 16
message 17
message 18
message 19
message 20
message 21
message 22
message 23
message 24
message 25
message 26
message 27
message 28
message 29

OS and Theia version: Theia 0.10.0

akosyakov commented 5 years ago

Related https://github.com/theia-ide/theia/issues/3610 or maybe the same 😄

thegecko commented 5 years ago

Looks similar. We figured it's because of exposing a backend terminal.

tsmaeder commented 5 years ago

I think this is really a problem in the react list widget: "select all" should set the selection to all items and actions like "copy" should refer to the internal model, not the rendered text. This works correctly in the editor. There is really no reason it should not in a virtualized list widget. The said, not sure how this could be fixed.