0

I downloaded Anaconda and VS Code and tried to link them. However, when I just test very simple code that just prints "hello world", it did not show the result in the terminal. So I tried to change the default terminal setting to one of other options (Command Prompt, Powershell, Windows Powershell), but none of them solved the problem.

**I can see the result, if I debug python file. The problem is only showed in terminal

Terminal shows this first:

enter image description here

And it changed to this:

enter image description here

How can I see the result?

Ethan
  • 876
  • 8
  • 18
  • 34
hyewwns
  • 21
  • 4

2 Answers2

1

After starting your application (debug mode), click View > Output (Ctrl + Alt + O) to show the output window. Stop your application and restart Visual Studio. Next time you run your application the output window should be visible automatically because Visual Studio remembers your opened windows in debug mode.

Saurabh
  • 127
  • 7
0

enter image description here

I can not reproduce your problem, and it's weird, could you try this configuration:

  "terminal.integrated.defaultProfile.windows": "Command Prompt",
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell",
      "path": [
        "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
      ],

      "args": ["-NoLogo"]
    },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [],
      "icon": "terminal-cmd"
    }
  },

If it still not work, could you try to install the older version of the Python Extension? And could you have a try of Code Runner?

Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13