Home > Mobile >  When I run the code in vs code, the results seem to appear and then disappear quickly, how do I fix
When I run the code in vs code, the results seem to appear and then disappear quickly, how do I fix

Time:03-21

I downloaded Anaconda, and vs code, and I tried to link those. However, when I just test very simple code, which is just printing "hello world", it did not show the result in terminal. So I tried to change 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 show this first. 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?

  • Related