Is it possible to configure User Settings to have the Integrated Terminal to start automatically when opening Visual Studio Code?
Start in Visual StudioOn the menu bar, select Tools > Command Line > Developer Command Prompt or Developer PowerShell.
There is now an extension that lets you set terminals on startup, and even works with split terminal views!
https://marketplace.visualstudio.com/items?itemName=EthanSK.restore-terminals
ps i wrote it
As of VS Code v1.45.0, the experimental configuration mentioned in this other answer should now be the default behavior for VS Code. Just make sure to save your files/folders in a workspace. See the What is a VS Code "workspace"? section of the VS Code docs.
VS Code remembers the last state of your workspace and restores it. If I have the Integrated Terminal panel opened before I closed the window, it gets reopened when I reload or reopen the workspace (I can't seem to find the setting for this though). So basically, the Integrated Terminal is already auto displayed. (I use Ubuntu 18 and macOS 10.15.)
If you have a specific terminal setup (ex. multiple terminals opened to different directories, python envs, workspaces, etc.), you could check out Terminals Manager which is for "setting-up multiple terminals at once" and can be configured to auto-run on startup.
You just need to add a terminals.json file in your workspace (under .vscode) with something like this, and set autorun
to true
. This would auto-run the extension's Terminals: Run command on startup to auto-load your terminals.
{
"autorun": true,
"autokill": true,
"terminals": [
{
"name": "GIT",
"description": "For running git commands",
"open": true,
"focus": true,
"commands": [
"pwd",
"git fetch -v"
]
},
{
"name": "BUILD",
"description": "For running build commands",
"open": true,
"focus": false,
"commands": [
"cd apps",
"./clean.sh"
]
},
{
"name": "SCRIPTS",
"description": "For running python commands",
"open": true,
"focus": false,
"commands": [
"source $VENV_DIR/test-py38/bin/activate",
"python -V"
]
},
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With