This is for people who find that
"window.newWindowDimensions": "maximized",
does not actually work on Windows. Symptoms: some or all vscode windows are not maximized on startup.
The first thing you'll want is
"window.restoreWindows": "preserve",
in your vscode JSON preferences. This will always open the projects you had open last time, even when you start Code to open a single file.
Next you'll need to install AutoHotkey. It is available in Chocolatey.
Write these contents to a file somewhere, e.g. C:\opt\maximize_vscode_windows.ahk
:
#NoTrayIcon
WinGet, winList, List, ahk_exe Code.exe
Loop %winList%
{
item := winList%A_Index%
WinMaximize, ahk_id %item%
}
Next, in some folder that you have vscode always open on startup, add a .vscode/tasks.json
with
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Maximize all vscode windows",
"type": "shell",
"command": "C:\\Program Files\\AutoHotkey\\AutoHotkey.exe",
"args": ["C:\\opt\\maximize_vscode_windows.ahk"],
"group": "none",
"presentation": {
"reveal": "never",
"panel": "shared"
},
"runOptions": {
"runOn": "folderOpen"
},
"problemMatcher": []
}
]
}
You can test this task with the Tasks: Run Task
command.
Finally, run the Tasks: Manage Automatic Tasks in Folder
command and Allow
tasks to run automatically.
You should now be able to experience MAXIMIZED VSCODE WINDOWS ON STARTUP.