Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code terminal is failing to launch

I tried to compile a program, but the terminal is not opening.

error:The terminal process failed to launch: Starting directory (cwd) "D:\vs code\march long 2020" does not exist.

This guy has the same error, but the pop-up is different link.

Below is the JSON file of my Visual Studio Code:

{
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "C_Cpp.updateChannel": "Insiders",
    "files.autoSave": "afterDelay",
    "java.saveActions.organizeImports": true,
    "window.zoomLevel": 0,
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "terminal.integrated.windowsEnableConpty": false,
    "json.schemas": [

    ]
}

See this link for full error description. I wrote code and compiled and got an error message.

Link

like image 543
mr. abhi Avatar asked Sep 04 '25 17:09

mr. abhi


1 Answers

This setting breaks my terminal window (because PowerShell is blocked due company administrative policy):

Enter image description here

Afterwards, I could not open the terminal again.

Restore CMD as default

  • open File > Preferences > Settings (CTRL+,)
  • search for terminal.integrated.defaultProfile.windows and set a default (for me Command Prompt)

Enter image description here

Now the terminal should open again. This is not a fix to get PowerShell working in Visual Studio Code, just a guide to restore the terminal window.

like image 78
ztom Avatar answered Sep 07 '25 10:09

ztom