Thursday, November 10, 2022

VScode cannot be loaded because running scripts is disabled on this system

Terminal is not opening in VSCode. It gives the error.

VScode cannot be loaded because running scripts is disabled on this system
Open VSCode.

Go to
File > preferences > settings > extension > edit settings.json

Add following snippet at the start below first curly brace {


"terminal.integrated.profiles.windows": {
  "PowerShell": {
    "source": "PowerShell",
    "icon": "terminal-powershell",
    "args": ["-ExecutionPolicy", "Bypass"]
  }
},
"terminal.integrated.defaultProfile.windows": "PowerShell",

Now restart VS Code, close the Terminal and open it again.

No comments:

Post a Comment