1

I'm on the latest version of VSCode, which at time of writing is v1.60.0. On Windows, the default console in which code runs in the integrated terminal is PowerShell. I changed my default terminal profile to Command Prompt. Now when I pop up a new terminal ( Ctrl + Shift + ` ), I'm dropped into a Command Prompt console, as I should be.

Microsoft Windows [Version 10.0.19042.1165]
(c) Microsoft Corporation. All rights reserved.

C:\Users\AK\Desktop\Deep Learning\PyTorch>C:/ProgramData/anaconda3/Scripts/activate

(base) C:\Users\AK\Desktop\Deep Learning\PyTorch>conda activate base

(base) C:\Users\AK\Desktop\Deep Learning\PyTorch>

However, whenever I run the code I'm writing in the editor ( Ctrl + Alt + N ), the code continues to run in a PowerShell console.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\AK> cd "c:\Users\AK\Desktop\Deep Learning\PyTorch"
PS C:\Users\AK\Desktop\Deep Learning\PyTorch> python "c:\Users\AK\Desktop\Deep Learning\PyTorch\test.py"
hello world
...

I don't have a standalone PowerShell extension installed, so it might be integrated into another extension.

How do I configure VSCode to not just set my default terminal to cmd.exe but also run code in it as well?

AK-33
  • 167
  • 2
  • 10
  • 1
    There is a known problem in v1.60.0, scheduled to be fixed in v1.60.1 - your problem may be a symptom of it - see https://stackoverflow.com/a/69050730/45375 – mklement0 Sep 06 '21 at 03:42
  • 1
    Looks like it ... good catch! I'll wait to see if it's fixed in the next update. – AK-33 Sep 06 '21 at 03:45

1 Answers1

0

As indicated by @mklement0, this problem is the result of a bug that has been addressed in v1.60.1.

AK-33
  • 167
  • 2
  • 10