I cannot Copy-Paste from the Visual Studio Code console. In ISE one can copy-paste some of the output, but it does not seem to be possible in Visual Studio Code Terminal. How can I copy-paste the output from the console when running PowerShell commands? I have the PowerShell Extension.
-
1This should work fine by default. What particular methods for copying and pasting are you using, and what, specifically happens or doesn't happen? – mklement0 Mar 12 '22 at 21:18
-
1@mklement0: I use the mourse and right clicking but the menu does not show. I have also tried to simply ctrl + c and see if I have the content in my clipboard but it does not work. – xhr489 Mar 12 '22 at 21:29
-
1Right-clicking by itself should already copy selected text. If you prefer Ctrl+C (which by default interrupts the current command), have a look at [this Q&A](https://stackoverflow.com/q/45257525/7571258). – zett42 Mar 12 '22 at 21:31
1 Answers
Ctrl+C and Ctrl+V for copying / pasting work as-is in Visual Studio Code's integrated terminal.
By contrast, right-click behavior is configurable:
On Windows, the default behavior is to copy, if text is currently selected, and paste otherwise - as in regular console windows.
To get the same behavior as in the Windows PowerShell ISE, i.e. to instead show a shortcut menu, which contains
Copy
andPaste
commands, add the following line to yoursettings.json
file (before the closing}
):
"terminal.integrated.rightClickBehavior": "default",
Alternatively, use the settings GUI (press Ctrl+,):
Note:
The screenshot was taken on macOS, where
selectWord
is the default setting; on Windows, it iscopyPaste
, with the behavior as described above.Also note the GUI's convenient search feature: typing
right click
in the search field was sufficient to locate the relevant setting.

- 382,024
- 64
- 607
- 775