Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto Terminal on StartupNew to Visual Studio Code? Get it now.
Auto Terminal on Startup

Auto Terminal on Startup

lixiaolai

|
1 install
| (0) | Free
Automatically opens a terminal in the editor area when VS Code starts without a folder
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Auto Terminal on Startup

Visual Studio Marketplace Version Visual Studio Marketplace Installs

A simple VS Code extension that automatically opens a terminal in the editor area when VS Code starts without a folder.

Features

  • Automatically opens a terminal when VS Code launches without a workspace/folder
  • Terminal opens in the editor area (based on your terminal.integrated.defaultLocation setting)
  • Configurable: Can be enabled/disabled via settings
  • Option to control whether it only opens when no folder is present

Requirements

  • VS Code 1.84.0 or higher
  • Your VS Code settings should have: "terminal.integrated.defaultLocation": "editor"

Installation

Install from the VS Code Marketplace:

  1. Open VS Code
  2. Go to Extensions view (Cmd+Shift+X or Ctrl+Shift+X)
  3. Search for "Auto Terminal on Startup"
  4. Click Install

Or install via command line:

code --install-extension lixiaolai.auto-terminal-on-startup

Or visit the VS Code Marketplace

Extension Settings

This extension contributes the following settings:

  • autoTerminal.enabled: Enable/disable the auto-open terminal feature (default: true)
  • autoTerminal.onlyWhenNoFolder: Only open terminal when no folder is open (default: true)

To configure, add to your settings.json:

{
  "autoTerminal.enabled": true,
  "autoTerminal.onlyWhenNoFolder": true
}

How It Works

  1. Extension activates on onStartupFinished event
  2. Checks if no folder/workspace is open (if onlyWhenNoFolder is true)
  3. Waits 500ms for VS Code UI to fully initialize
  4. Executes workbench.action.terminal.new command
  5. Terminal opens in editor area (based on your terminal.integrated.defaultLocation setting)

Troubleshooting

Terminal opens in panel instead of editor area

Make sure your VS Code settings include:

{
  "terminal.integrated.defaultLocation": "editor"
}

Terminal doesn't open automatically

  1. Check that the extension is enabled:

    • Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
    • Type "Extensions: Show Installed Extensions"
    • Look for "Auto Terminal on Startup"
  2. Check the extension settings:

    {
      "autoTerminal.enabled": true
    }
    
  3. Check the Developer Console for errors:

    • Help > Toggle Developer Tools
    • Look in Console tab for any error messages

Disable the extension temporarily

Set in your settings.json:

{
  "autoTerminal.enabled": false
}

Or disable the extension completely:

  • Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
  • Type "Extensions: Disable"
  • Select "Auto Terminal on Startup"

Uninstallation

Via VS Code:

  1. Go to Extensions view (Cmd+Shift+X or Ctrl+Shift+X)
  2. Find "Auto Terminal on Startup"
  3. Click Uninstall

Or via command line:

code --uninstall-extension lixiaolai.auto-terminal-on-startup

Development

Building from Source

cd /path/to/open-terminal-at-vscode-without-folder-specified
npm install -g @vscode/vsce
vsce package

Testing

  1. Press F5 in VS Code to open Extension Development Host
  2. Close all folders/workspaces
  3. Terminal should open automatically in editor area

Known Issues

  • The extension cannot detect if a terminal already exists in the editor area, so it will always create a new one on startup
  • 500ms delay is hardcoded (may need adjustment for slower systems)

Release Notes

1.0.0

Initial release:

  • Auto-open terminal in editor area on VS Code startup
  • Configurable via settings
  • Only opens when no folder is present (optional)

License

MIT

Author

Xiaolai

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft