If you’ve been using Visual Studio Code(VS Code) for a while, you’ve probably encountered the frustrating “The terminal process terminated with exit code 1” error message at some point. This issue can pop up for various reasons, but the good news is that most cases can be resolved with a few straightforward solutions.

I’ve compiled the most effective, tested methods that developers have used successfully to tackle this problem. Let’s dive into the causes and walk through each solution step by step.

 

1. Antivirus Software Interference Resolution

One of the most common culprits behind this error is antivirus software blocking VS Code’s terminal processes.

Solution Steps

  1. Add VS Code Installation Folder to Whitelist
    • Windows Defender: Settings → Virus & threat protection → Add exclusions
    • Add VS Code installation path (default: C:\Users\[username]\AppData\Local\Programs\Microsoft VS Code)
  2. Exclude Specific Files Add these files to your antivirus exclusion list:
    {VS Code Install Path}\resources\app\node_modules.asar.unpacked\node-pty\build\Release\winpty.dll
    {VS Code Install Path}\resources\app\node_modules.asar.unpacked\node-pty\build\Release\winpty-agent.exe
    {VS Code Install Path}\resources\app\node_modules.asar.unpacked\node-pty\build\Release\conpty.node
    

Setting Path upon Virus Vaccines

Antivirus Software Settings Path
Windows Defender Settings → Virus & threat protection → Add exclusions
Malware Bytes Settings → Exclusions → Add folder exclusion
Norton Settings → Antivirus → Scans and Risks → Exclusions/Low Risks
Avast Settings → General → Exceptions

 

 

2. Disable Legacy Console Mode

Windows Legacy Console mode can interfere with VS Code’s terminal functionality.

Solution Steps

  1. Search for cmd in the Start Menu
  2. Right-click Command PromptRun as administrator
  3. Right-click the window’s title bar → Properties
  4. In the Options tab, uncheck “Use legacy console”
  5. Click OK and restart VS Code

 

 

3. Change PowerShell Execution Policy

Restrictive PowerShell execution policies can trigger this error.

Solution Steps

  1. Run PowerShell as Administrator
  2. Execute this command:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
    
  3. Type Y when prompted for confirmation

 

 

4. Reconfigure VS Code Terminal Settings

Sometimes the terminal configuration gets corrupted and needs to be reset.

Solution Steps

  1. Press Ctrl + Shift + P to open Command Palette
  2. Search for “Terminal: Select Default Profile” and select it
  3. Choose PowerShell or Command Prompt
  4. Edit settings.json if needed:
    {  "terminal.integrated.defaultProfile.windows": "PowerShell",  "terminal.integrated.profiles.windows": {    "PowerShell": {      "source": "PowerShell",      "icon": "terminal-powershell"    }  }}
    

 

 

5. Fix Permission and Administrator Mode Issues

In some environments, insufficient permissions prevent the terminal from launching properly.

Solution Steps

  1. Run VS Code as Administrator
    • Right-click VS Code icon → Run as administrator
  2. Disable PowerShell Administrator Requirement
    • Remove the “Run as administrator” setting from PowerShell executable properties

 

 

6. Resolve Special Character Path Issues

Project folders containing non-ASCII characters or special symbols can cause terminal failures.

Solution Steps

  1. Rename project folders to use only English characters
  2. Move projects to English-only paths
  3. Reopen workspace

Example:

Before: C:\프로젝트\웹개발\내사이트
After: C:\Projects\WebDev\MySite

 

 

7. Resolve Running Process Conflicts

Other processes might be holding onto terminal resources.

Solution Steps

  1. Open Task Manager (Ctrl + Shift + Esc)
  2. Go to Details tab and end these processes:
    • powershell.exe
    • cmd.exe
    • node.exe (if running)
  3. Restart VS Code

 

 

8. Check WSL (Windows Subsystem for Linux) Configuration

WSL-related issues can cause terminal launch failures.

Solution Steps

  1. Check WSL status in PowerShell:
    wslconfig.exe /l
    
  2. Set default distribution:
    wslconfig.exe /setdefault "Ubuntu"
    
  3. Update WSL:
    wsl --update
    

 

 

9. Complete VS Code Reinstallation

If other methods fail, a clean reinstall might be necessary.

Solution Steps

  1. Uninstall VS Code
    • Control Panel → Uninstall a program
  2. Delete user data folders:
    %APPDATA%\Code%USERPROFILE%\.vscode
    
  3. Download and install latest version

 

 

The “terminal process terminated with exit code 1” error is frustrating, but it’s almost always solvable. In my experience, antivirus software interference and legacy console settings account for about 80% of these issues. Start with the antivirus exclusions and legacy console fixes first—they’re quick to implement and resolve most cases. If you’re in a corporate environment, the PowerShell execution policy change is often the key.

Remember to restart VS Code after making any changes, and don’t hesitate to try multiple solutions if the first one doesn’t work. Every development environment is slightly different, so what works for one setup might need tweaking for another. 🙂

 

댓글 남기기