Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi page selection in debug console #2163

Closed
roblourens opened this issue Jan 21, 2016 · 24 comments
Closed

Multi page selection in debug console #2163

roblourens opened this issue Jan 21, 2016 · 24 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@roblourens
Copy link
Member

I assume the console view is virtualized and so I can't copy a large amount of output at once. This is useful when debugging the Chrome adapter since it has a setting to write tons of logs into the console.

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 22, 2016
@isidorn isidorn added this to the Backlog milestone Jan 22, 2016
@isidorn isidorn added the feature-request Request for new features or functionality label Jan 22, 2016
@isidorn isidorn removed their assignment Jan 29, 2016
@felixfbecker
Copy link
Contributor

Until you can select more than one page, could you maybe implement #3974 so at least the whole output could be copied at once, directly? I am also often in the position that I ask people to send me their logs and they cannot...

@MarkPieszak
Copy link

I believe this is fixed now in 1.8+ and can be closed out 👍 @roblourens

@isidorn
Copy link
Contributor

isidorn commented Dec 21, 2016

@MarkPieszak no, it is not fixed unfortunetly 🐝

@MarkPieszak
Copy link

Oh strange maybe I was in another tab sorry! Apologies :(

@JacobJT
Copy link

JacobJT commented Feb 1, 2017

e261525

Did this commit just add a "copy" item to the right click context menu? If so, that button still has this same issue. Seems to function the same as cmd/ctrl + c. If it's not feasible or easy to add a way to copy all selected text instead of only what's in the window, a "copy all" button would suffice and I can get the snippet I need in another window. But having to copy / paste in fragments is a terrible UX.

@benjamin21st
Copy link

A hack of this would be redirect output to a file, what I did was to add ">" and then a filename like "output.txt" to "launch.json" in the "args" field. Works fine for now.

@joefrancia
Copy link

Is "selecting and copying a region of text" really so novel or difficult to figure out? I can swear I've seen such a thing in another app once.

@JacobJT
Copy link

JacobJT commented Feb 3, 2017

@benjamin21st mind adding a quick snippet so we can see this formatting? This sounds very useful. Will it overwrite each time we run the debugger, or always add to the file?

@benjamin21st
Copy link

@JacobJT Just like in command line you can do something like:
./myprogram > output.txt
In VS Code, you can set up your launch.json file such that it has the following args in one of your tasks:
"args": [ "arg1", "arg2", ">", "output.txt" ]

isidorn added a commit that referenced this issue May 16, 2017
@isidorn
Copy link
Contributor

isidorn commented May 16, 2017

I have investigated today for the things needed in order to make this work:

  1. The tree needs to auto reveal top and bottom as the selection changes. This is possible to get done using the selectionchange and selectstart events
  2. Since the tree is virtualised the native selection can never span through elements which are currently not visible. In order to make copy work we would need to append selected textas we are scrolling in the tree. This can be rather tricky if the selection is changing directions

An alternative approach is to determine on what element in the model the selection started and where it ended and to copy the content between these elements. However the issue here is that the selection will not in some cases match what is being copied.

Another alternative approach is to use the editor for the debug console implementaion which is captured here #11462

Since the ideas above require quite an effort and would introduce additional issues for now we have chosen a pragmatic solution already suggested by @felixfbecker and have added a context menu action to simply copy all the output. So keeping this issue open as a feature request to be able to do more fine grained multi page copying but pushing it to backlog as I believe this workaround will help with most scenarios.
You can try it out in tomorrows insider build or in the next stable at start of june.

screen shot 2017-05-16 at 11 31 27

@isidorn isidorn modified the milestones: Backlog, May 2017 May 16, 2017
@isidorn isidorn changed the title No way to copy more than a page of text out of the Debug Console at a time Multi page selection in debug console May 16, 2017
@isidorn isidorn added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels May 16, 2017
@zhaihm
Copy link

zhaihm commented Jun 5, 2017

Can we add a "Copy All (Unformatted)" or "Copy All (Plain text)" function to the menu?
When I copy/paste the log into text editor (like Notepad++), there are characters that editor can't display. It would be a lot easier to analyze the log if we can just copy the log as plain text.

@isidorn
Copy link
Contributor

isidorn commented Jun 6, 2017

@zhaihm please open a new issue / feature request for this and ping me on it. Thanks

@zhaihm
Copy link

zhaihm commented Jun 6, 2017

Thanks for the replay. @isidorn I opened #28094 for this feature.

@smarigowda
Copy link

I am using latest version 1.13.1, I can not see Copy All. Is there any flag to enable this?
can-not-see-copy-all

@felixfbecker
Copy link
Contributor

@smarigowda that is the variables panel, not the debug console

@smarigowda
Copy link

thank you. I can see it in debug console. Impressed with your lightning fast reply 👍

@bersbersbers
Copy link

This issue also applies to less-than-multipage selections in my opinion. Select a single character in the Debug Console, scroll the Debug Console up or down just far enough that the selection disappears, then scroll back to the original scroll position - the selection is gone.

@tjx666
Copy link
Contributor

tjx666 commented Nov 8, 2021

Another problem is that I can't select the first charactor.

For example, I can't select the charactor n in following screenshot:

image

@roblourens roblourens added the *out-of-scope Posted issue is not in scope of VS Code label Dec 14, 2022
@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2022
@roblourens
Copy link
Member Author

Unfortunately I don't think this is practical with the virtualized debug console as it currently works. I think the "Copy All" context menu option which now exists is the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests