'Open terminal by default

Is there a way to open terminal by default in VSCode? I saw the questions here four years ago - VS Code - How to have Terminal pane open by default? not sure if there is any update.



Solution 1:[1]

You can use the tasks.json file to "auto-run" terminals with Tasks. See documentation at https://code.visualstudio.com/docs/editor/integrated-terminal#_automating-launching-of-terminals

tasks.json template:

{
  "version": "2.0.0",
  "presentation": {
    "echo": false,
    "reveal": "always",
    "focus": false,
    "panel": "dedicated",
    "showReuseMessage": true
  },
  "tasks": [
    {
      "label": "Open terminal by default",
      "dependsOn": [
        "Terminal"
      ],
      "runOptions": {
        "runOn": "folderOpen"
      }
    },
    {
      // The name that shows up in terminal tab
      "label": "PowerShell",
      // The task will launch a shell
      "type": "shell",
      "command": "",
      // Set the shell type
      "options": {
        "shell": {
          "executable": "powershell.exe",
          "args": []
        }
      },
      // Mark as a background task to avoid the spinner animation on the terminal tab
      "isBackground": true,
      "problemMatcher": []
    }
  ]
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aryn Thernium