Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

If Visual Studio Code says “The window terminated unexpectedly”, the message alone does not identify the cause. A workbench window can exit after an extension, graphics, profile, workspace, remote-session, resource, permission, or update problem. Note any reason and numeric code shown, then isolate the cause before reinstalling or deleting data.

Start in this order: launch with extensions disabled, test without GPU acceleration, run with a temporary user-data directory, and open an empty window. These tests are reversible and help distinguish common causes without disturbing your projects or normal profile.

Try these safe checks first

  1. Close all VS Code processes. If an update or an orphaned process may be involved, restart the computer and try again.
  2. Disable installed extensions for one launch:
    code --disable-extensions

    If VS Code stays open, investigate extensions before changing your profile or reinstalling.

  3. Test graphics acceleration:
    code --disable-gpu

    This is a diagnostic for graphics-related failures, not a universal fix.

  4. Test a separate, temporary profile:
    code --user-data-dir /tmp/vscode-clean

    On Windows, use code --user-data-dir "$env:TEMPvscode-clean" in PowerShell; on macOS, use code --user-data-dir "$TMPDIR/vscode-clean". Choose a writable temporary location.

  5. Open an empty window:
    code --new-window

    Then try the affected folder separately. If only that project triggers the problem, follow the workspace checks below.

These command-line options are documented by VS Code’s CLI guide. On macOS, the code command may need to be installed from the Command Palette. On Windows, if code is not recognized, try the installed Code.exe or configure command-line integration; installation paths vary. Use code --help to check available options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the message means—and what the code does not tell you

“Window” refers to a VS Code workbench window; it does not necessarily mean the entire operating-system application failed. The window might terminate because its renderer or Electron process crashed, graphics initialization failed, an extension host or remote component stopped, profile or workspace state caused trouble, resources ran out, or a particular release encountered a regression. Permissions, security policies, and sandboxing can also affect launch behavior.

#1 Best Overall
Sale
Nulaxy Ergonomic Adjustable Laptop Stand for Desk, Dual Foldable Computer Riser with Advanced Heat-Vent, Heavy-Duty Portable Notebook Holder for Posture Correction, Compatible with Mac 10-16" Laptops
  • Ergonomic Posture Correction: Designed to elevate your laptop to the perfect eye level, this adjustable laptop stand significantly reduces neck, shoulder, and spinal fatigue. Transform your desk into a healthier workstation, ideal for long hours of typing, Zoom meetings, or gaming.
  • Unshakable Dual-Rod Stability: Unlike single-hinge models, our stand features a highly engineered dual-support rod mechanism. It perfectly distributes weight to ensure a 100% wobble-free typing experience, safely supporting heavy-duty devices up to 22 lbs (10kg).
  • Advanced Thermal Cooling Panel: Maximize your device's performance. The unique geometric heat-vent design on the upper panel provides superior airflow compared to standard solid stands. This continuous heat dissipation prevents your laptop from thermal throttling and hardware damage during intensive tasks.
  • Universal 10-16” Compatibility: A versatile computer riser that seamlessly fits all 10 to 16-inch laptops. Broadly compatible with MacBook Pro/Air, Dell XPS, HP, Lenovo, ASUS, Chromebook, and large gaming laptops. The anti-slip silicone pads firmly grip your device and protect it from scratches.
  • Foldable, Portable & Ready to Go: Maximize your productivity anywhere. The dual-foldable design allows the stand to collapse completely flat in seconds. Easily slip it into your backpack or briefcase, making it the ultimate portable office accessory for business trips, cafes, or hybrid work setups.

The displayed reason and number are useful clues to include in a report, but there is no universal mapping from a numeric code to one cause. Reports have described, for example, a Windows Insiders crash with code -2147483645, a macOS crash with code 5, a Linux clean-exit with code 0, and an administrator-launch failure with launch-failed code 18. Those are separate reports, not a lookup table or proof that the same problem affects your installation (Windows Insiders, macOS, Linux, administrator launch).

1. Find out whether an extension is involved

Run code --disable-extensions from a terminal. If VS Code now remains open, an installed extension or extension host becomes a stronger suspect. It is not proof: a crash may still come from a built-in feature, the workspace, graphics, the platform, or a remote component.

  1. Open the Extensions view and re-enable extensions in small groups.
  2. Restart and test after each group. If the crash returns, split that group into smaller sets until you narrow down the extension.
  3. Test likely sources separately: language servers, Git integrations, notebooks, remote-development tools, terminal customizers, themes, and AI assistants.
  4. Check whether the failure occurs only in one workspace. An extension can behave differently with that project or its workspace-specific recommendations and settings.
  5. Disable, update, downgrade, or uninstall the suspected extension, then check its Output channel and issue tracker.

VS Code supports disabling extensions globally or for a workspace, as well as updating and uninstalling them. For a useful inventory to attach to a report, run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
code --list-extensions --show-versions

See the official extension management documentation. A local extension test may not reproduce a remote extension-host failure; if the crash happens only with SSH, WSL, or a container, use the remote checks below.

2. Test for GPU or display-stack problems

Try code --disable-gpu if you see blank windows, rendering glitches, unusually high GPU use, or graphics errors—or if the issue began after a graphics-driver or VS Code update. It can also be a useful isolation test with a virtual machine, remote desktop, dock, external monitor, or unusual Linux display setup.

Rank #2
Sale
BESIGN LS03 Aluminum Laptop Stand, Ergonomic Detachable Computer Stand, Notebook Riser, Laptop Mount Compatible with Air, Pro, Dell, HP, Lenovo More 10-15.6" Laptops, Silver
  • Broad Compatibility: Besign LS03 Laptop Mount is compatible with all laptops from 10''-15.6'', such as Air 13, Pro 13 / 15 / 2018 / 2017 / 2016, Lenovo ThinkPad, Dell, HP, ASUS, Chromebook, and other notebooks.
  • Ergonomic Design: This LS03 Laptop Stand could elevate your laptop by 6’’ to a perfect viewing level, help you improve your posture and reduce neck and shoulder pain. This laptop stand is super easy to detach and assemble.
  • Stable And Protective: This laptop stand is made of premium Aluminum alloy, it is sturdy, support up to 8.8 lbs(4kg), no worry any wobble at all; the rubber on the holder hands sticks tightly, ensure your laptop stable on the stand and prevent any scratches.
  • Keep Laptop Cool: the open aluminum design provides good ventilation and airflow to prevent your laptop from overheating. It folds flat if you need to store it, create extra space on your desk and keep your desk clean and organized.
  • Easy to Use: thanks to the detachable design, you could assemble it very easily it 3 steps.

If this launch works, update the graphics driver where appropriate and compare behavior across displays or sessions. On Linux, display server, driver, VM, and remote-desktop differences can matter; inspect actual logs before assigning a cause. One specific July 2026 Linux report described a clean-exit code 0 after VS Code 1.129.0 alongside GLX/ANGLE initialization errors. It is an example of a release-and-graphics combination, not evidence that 1.129.0 or GPU acceleration explains every termination (issue report).

If only the integrated terminal has rendering problems, test its separate GPU setting in your user settings.json:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "terminal.integrated.gpuAcceleration": "off"
}

VS Code documents GPU and blank-window troubleshooting in its FAQ and terminal rendering options in terminal appearance. Disabling GPU acceleration can reduce rendering performance, and it will not fix unrelated extension, memory, permission, or remote-server failures. Treat it as a workaround while you investigate, not a guaranteed permanent cure.

3. Check whether your normal profile is the problem

Launch with a temporary --user-data-dir, using a different writable location for each operating system if needed:

# Linux example
code --user-data-dir /tmp/vscode-clean

# Windows PowerShell example
code --user-data-dir "$env:TEMPvscode-clean"

# macOS example
code --user-data-dir "$TMPDIR/vscode-clean"

This starts VS Code with separate user data, settings, state, and cached profile data. If the clean instance works, the executable is probably usable and something in the normal profile is more likely; the test does not identify one corrupted file or prove that the installation is fault-free. The CLI documentation describes isolated instances.

Rank #3
Sale
LOXP Adjustable Laptop Stand, Computer Stand with 360 Rotating Base
  • ✔️[Foldabe & Protable] - Foldable laptop stand for desk & Protable computer stand, It combines the advantages of market brackets, convenient travel laptop stand. Easy to use. Suitable for working at home, office and outdoor, improve comfort.
  • ✔️[360°Rotation] - The computer stand with 360° rotating base, 360° rotation connected with the base is more flexible, the computer stand allows you to rotate the laptop to any angle.
  • ✔️[Stable & Durable] - The Computer stand is made of one-piece fiber metal material, which is more durable and stable than ordinary aluminum alloy computer stands. The upgraded rotating base makes the stand performance more stable, and the non-slip silicone protects the laptop from sliding.Only supports laptops up to 16 inches.
  • ✔️[Ergonmic Desing] - You can freely adjust the height and angle of the laptop stand to keep it at eye level, which helps to reduce the pressure on your body while working. Whether sitting or standing, there is a comfortable angle.
  • ✔️[Wide Compatibility] - Our laptop stand is compatible with all laptops from 10-16 inches, such as MacBook Air/Pro, Google PixelBook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc. It is an ideal companion for computer workers.

Before resetting anything, back up settings, snippets, keybindings, profiles, and any other configuration you need. If you reset manually, rename the relevant data directory instead of deleting it—for example, Code to Code.backup, or a specific User or GPUCache folder to a backup name. The correct location depends on operating system, installation type, product variant, and portable mode, so do not assume one path applies to every setup. A reinstall may leave user data, extensions, or caches intact; reinstalling the application is not necessarily a profile reset.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. If opening a project triggers the crash

If an empty window stays open but one folder causes trouble, focus on that workspace instead of removing the whole installation. First test the folder with extensions disabled:

code --disable-extensions path/to/project

Then try the following, changing one thing at a time:

  • Temporarily rename the project’s .vscode directory. This lets you test whether workspace settings, tasks, launch configuration, or recommendations are involved. Restore the directory afterward if the test makes no difference.
  • Open a smaller subfolder, or temporarily exclude very large generated directories from Explorer and search using files.exclude. Huge trees can cause heavy CPU use and apparent unresponsiveness; see the VS Code FAQ.
  • Check whether notebooks, language servers, indexing tools, Git operations, or extensions activate only in that project.
  • Test whether the folder is on a network share, synchronized directory, mounted filesystem, or remote filesystem.

Do not delete .git or project files as a routine troubleshooting step. A project that is merely too large or slow may need narrower folders or exclusions, not data removal.

5. If the failure happens when opening a terminal

A terminal that fails to start is not the same as a VS Code window that terminates, although a shell, environment, or terminal extension can be part of a wider problem. If the window stays open until you create a terminal, inspect the default shell profile, shell path and arguments, terminal.integrated.cwd, environment variables, and terminal.integrated.inheritEnv. Also check shell startup scripts such as .bashrc, .zshrc, or a PowerShell profile, prompt customizers, remote shell integration, and extensions that modify terminals.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Gogoonike Adjustable Laptop Stand for Desk, Metal Laptop Riser Holder
  • 【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
  • 【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
  • 【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
  • 【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
  • 【Broad Compatibility】:Our desktop book stand is compatible with all laptops from 10-15.6 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.

On Windows, ConPTY and terminal configuration may be relevant. For a controlled test, disable extensions first, then temporarily bypass shell-profile customizations or test another available shell. Use the shell’s own syntax and avoid changing several settings at once. VS Code’s terminal launch troubleshooting guide covers profiles, paths, arguments, working directories, inherited environments, and trace logging.

6. Separate local failures from SSH, WSL, or container failures

Open a local folder first. If local use is stable but connecting through Remote – SSH, WSL, or a Dev Container triggers the issue, the local window may be healthy while a remote extension host or server is failing. Disable nonessential extensions, record the remote logs, and check the remote machine or environment for disk space, memory, process limits, permissions, and shell startup problems. For SSH, try another host if one is available; for WSL or containers, compare with a clean distribution or container.

Do not reinstall remote components before collecting useful logs if you can avoid it. A report has described a window termination after an SSH connection or while opening a notebook, illustrating why remote failures need their own diagnosis (remote-session report).

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

7. Check for an update regression

In Help > About, record the exact VS Code version and commit, then note when the issue started and whether it followed a stable or Insiders update, operating-system update, or driver change. Repeat the extension, GPU, and clean-profile tests so you can tell whether the problem is limited to one environment.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check official VS Code release information and the issue tracker for that exact version and platform. A January 2026 Windows Insiders report involved a separate crash code and was marked as having an Insiders patch (report); July 2026 reports describe a different Linux scenario around version 1.129.0. These examples show why versions and dates matter, not that either build is universally broken. If you test a previous stable release, use official VS Code downloads and treat rollback as a temporary diagnostic. Do not use unofficial mirrors or assume that an older build is a safe permanent fix.

Best Value
Tonmom Adjustable Laptop Stand for Desk, Metal Foldable Laptop Riser
  • ✅【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
  • ✅【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
  • ✅【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
  • ✅【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
  • ✅【Broad Compatibility】:Our laptop holder is compatible with all laptops from 10-17.3 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.

8. Treat administrator and sandbox workarounds cautiously

If the problem happens only when launching VS Code as Administrator on Windows, first launch it normally. Check whether the installation is user-scope or system-scope and ask an administrator to review endpoint security, group policy, or application-control restrictions.

A specific issue report lists --disable-chromium-sandbox as a workaround for an administrator launch failure with launch-failed, code 18 (report). Disabling Chromium’s sandbox weakens a security boundary, so this is not a routine fix. Do not adopt it just because another user’s error code looks similar; involve your administrator and use it only as a carefully considered, temporary diagnostic.

9. Check memory and other resource pressure

If the reason includes oom, the failure occurs during notebooks or AI tasks, or the whole system runs short of memory, check Task Manager, Activity Monitor, or your Linux system monitor. Close other memory-heavy applications and test without large workspaces, notebooks, indexing, language servers, or memory-intensive extensions. Look for a runaway extension or language-server process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Increasing available system or virtual memory may be appropriate in some circumstances, but changing a pagefile or swap setting is not a guaranteed VS Code fix. Treat oom and the timing as clues, then confirm with logs and resource use.

When the tests do not solve it: collect evidence

If the window still terminates after the extension, GPU, and clean-profile tests, stop making broad changes and prepare a reproducible report. Include:

  • Exact VS Code version and commit from Help > About, operating-system version, and CPU architecture.
  • The full termination reason and numeric code, if shown, plus when the problem began.
  • Whether it happens with extensions disabled, with --disable-gpu, and with a clean --user-data-dir.
  • Whether it occurs in an empty window, one workspace, a terminal, or only SSH, WSL, or a container.
  • Relevant window, extension-host, remote, or terminal logs, plus recent update, driver, shell, or security-policy changes.
  • Your extension inventory, if relevant: code --list-extensions --show-versions.

Where available, open the Command Palette and run Developer: Open Logs Folder, Developer: Set Log Level, or Show Window Log. Then use Help > Report Issue to provide the relevant information. The precise available commands can vary with the failure state. VS Code’s extension diagnostics guidance, terminal troubleshooting, and telemetry documentation describe diagnostic context and crash reporting. Review logs before sharing them and remove private source code, credentials, tokens, and other secrets.

Use the result to choose your next step

Test result Likely direction Next step
Stable with --disable-extensions Installed extension or extension host Re-enable extensions in groups and inspect extension logs.
Stable with --disable-gpu Graphics driver, Electron rendering, VM, or display stack Check graphics errors and drivers; keep GPU disabled only as a temporary workaround if needed.
Stable with temporary --user-data-dir Normal profile settings, state, cache, or extensions Back up and reset selectively rather than deleting the profile wholesale.
Empty window works; one folder fails Workspace configuration, project scale, or project-specific extension Test .vscode, large folders, and a smaller project area.
Local works; SSH, WSL, or container fails Remote server or remote extension host Check remote logs, shell startup, disk, memory, and permissions.
Only administrator launch fails Elevation, installation scope, policy, or sandbox interaction Launch normally and consult the administrator; do not disable the sandbox casually.
Crash began after an update Possible release, extension, or driver regression Record versions and timing; check official release information and test a supported update or rollback.
Reason includes oom Possible memory or process pressure Monitor resources and isolate heavy notebooks, language servers, and extensions.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.