Copy Terminal Output
Smart copy button for VS Code's terminal — copies only the latest command output.
Features
- One-click copy from the terminal toolbar
- Keyboard shortcut —
Ctrl+Alt+C (Mac: Cmd+Alt+C)
- Copy Last N Lines — pick exactly how many lines
- Status bar — shows buffered line count
- Smart fallback — full terminal copy when shell integration is unavailable
- Debug logging — check Output → Copy Terminal for troubleshooting
Settings
| Setting |
Default |
Description |
copyTerminal.maxLines |
200 |
Max lines to buffer per terminal (10–5000) |
Commands
| Command |
Shortcut |
Description |
| Terminal: Copy Output |
Ctrl+Alt+C |
Copy latest command output |
| Terminal: Copy Last N Lines |
— |
Choose how many lines to copy |
| Terminal: Clear Copy Buffer |
— |
Reset the buffer for active terminal |
Requirements
- VS Code 1.110.0+
- Shell integration enabled (default in modern VS Code)
Known Limitations
- Shell integration must be active for smart copy (falls back to full copy otherwise)
- Buffer resets when a new command runs in the same terminal
| |