Terminal Detach
Detach VS Code's integrated terminal into a standalone, resizable floating window. What It DoesTerminal Detach allows you to pop out VS Code's built-in terminal and debug console into their own standalone, draggable, resizable floating windows — while keeping all your running processes alive and your scroll position intact. Key Features
InstallationFrom VS Code Marketplace
From Open VSX Registry (for VSCodium, Gitpod, etc.)
From VSIX (Manual)
How to UseDetach a TerminalMethod 1: Right-Click (Fastest)
Method 2: Command Palette
Method 3: Keyboard Shortcut
Attach (Re-Dock) a TerminalMethod 1: Right-Click
Method 2: Command Palette
Method 3: Keyboard Shortcut
Detach the Debug Console
ConfigurationOpen VS Code settings (
Example
|
| Command | Windows/Linux | macOS | When |
|---|---|---|---|
| Toggle Terminal Detach/Attach | Ctrl+Shift+D |
Cmd+Shift+D |
Terminal focused |
| Toggle Debug Console Detach/Attach | Ctrl+Shift+Alt+D |
Cmd+Shift+Alt+D |
In debug mode |
You can customize these in File → Preferences → Keyboard Shortcuts and search for "Terminal Detach".
Known Limitations
- One detached terminal at a time — Only one terminal can be detached per VS Code window. If you need multiple detached terminals, open multiple VS Code windows.
- Terminal color themes — Custom terminal color themes may reset to default when re-attached. The running processes are completely unaffected.
- Linux opacity — The
windowOpacitysetting may not work on some Linux desktop environments (depends on compositor support). - Debug console — Requires the debug console to be visible in the editor area before detaching.
- Window state — VS Code handles the actual window creation; this extension orchestrates the detach/attach commands and manages state persistence.
Contributing
Contributions are welcome! Here's how to get started:
- Fork the repository on GitHub
- Clone your fork locally
- Install dependencies:
npm install - Open in VS Code and press
F5to run the extension in a new Extension Development Host window - Make your changes and test thoroughly
- Run tests:
npm test - Submit a Pull Request
Please read our Contributing Guidelines for more details.
Development Setup
# Clone the repo
git clone https://github.com/AceLozabe/terminal-detach.git
cd terminal-detach
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode (auto-recompile on changes)
npm run watch
# Run tests
npm test
# Package as .vsix
npm run package
Publishing to Marketplaces
Prerequisites
Before publishing, ensure you have:
- Node.js 18+ installed
- A VS Code Marketplace publisher account
- An Open VSX Registry account (Eclipse Foundation account)
Step 1: Install Publishing Tools
npm install -g @vscode/vsce ovsx
Step 2: Login to Marketplaces
VS Code Marketplace:
vsce login AceLozabe
# Enter your Personal Access Token when prompted
Open VSX Registry:
ovsx create-namespace AceLozabe
ovsx login AceLozabe
# Enter your Open VSX access token when prompted
Step 3: Update Version
Update the version in package.json following Semantic Versioning:
# Patch (bug fixes)
npm version patch
# Minor (new features, backward compatible)
npm version minor
# Major (breaking changes)
npm version major
Step 4: Publish
Publish to VS Code Marketplace:
npm run publish:marketplace
# or
vsce publish
Publish to Open VSX Registry:
npm run publish:openvsx
# or
ovsx publish
Package as .vsix (for manual distribution):
npm run package
# Creates: terminal-detach-1.0.0.vsix
Step 5: Create GitHub Release
- Go to your repo on GitHub → Releases → Draft a new release
- Choose the tag matching your version (e.g.,
v1.0.0) - Add release notes from
CHANGELOG.md - Attach the
.vsixfile - Publish the release
Adding This Extension to a New GitHub Repo
If you want to add this extension code to a newly created GitHub repository:
Step 1: Create the Repo on GitHub
- Go to github.com/new
- Name it
terminal-detach - Make it Public
- DO NOT initialize with README, .gitignore, or license (we already have these)
- Click Create repository
Step 2: Initialize and Push
# Navigate to the extension folder
cd terminal-detach
# Initialize git (if not already)
git init
# Add all files
git add .
# Commit
git commit -m "Initial commit: Terminal Detach extension v1.0.0"
# Add remote (replace with your actual repo URL)
git remote add origin https://github.com/AceLozabe/terminal-detach.git
# Push to main branch
git branch -M main
git push -u origin main
Step 3: Verify
Your repo should now contain:
terminal-detach/
├── .eslintrc.json
├── .gitignore
├── .vscodeignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── images/
│ ├── icon.png
│ └── icon-small.png
├── package.json
├── src/
│ ├── extension.ts
│ └── test/
│ ├── extension.test.ts
│ ├── runTest.ts
│ └── suite/
│ └── index.ts
└── tsconfig.json
License
This project is licensed under the MIT License — see the LICENSE file for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: ace.lozabe1@gmail.com
Made with ❤️ by Ace Lozabe from the Philippines
Free and open source for the community 🌏
# terminal_and_debugConsole_detach