Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy all text from the integrated vs-code terminal?

Is there a way to copy all the text from the integrated Visual Studio Code terminal? I have some output that I want to copy to a text file and save it.

like image 468
becko Avatar asked Sep 06 '25 15:09

becko


2 Answers

If right-click in the terminal is configured to paste, hold Shift while right-clicking to bring up the contextual menu and choose Select All and Copy.

like image 83
hectorct Avatar answered Sep 11 '25 13:09

hectorct


I can just right-click in the terminal and chose Select All and then right-click and Copy. Does that not work for you?

There is an unbound command for the selection:

workbench.action.terminal.selectAll

and Ctrl+C for the copy.

If you do this a lot you could make a macro to do the whole thing: select, copy, open a new text file and paste.

like image 41
Mark Avatar answered Sep 11 '25 13:09

Mark