0

Since this morning, my Visual Studio Code (on Macbook Pro, M1-chip) rather brusquely started behaving differently.

If I now run code from a Python script line by line in the Python terminal (see attached gif):

  1. a new terminal window opens. In this terminal Visual Studio Code correctly launches my preferred Python (3.10.9 (conda)) distribution.
  2. Yet, it then quickly breaks this terminal process and opens a new one. In this second instance, Python is not launched, but the Python commands are sent to this new terminal, which self-evidently produces an error.
  3. Then, if I launch Python in my second terminal manually, I can continue with the script.

Why does this happen? And what can I do to get it back to how it always has been? Just one terminal that opens...

For what it's worth, I am sharing here my terminal.integrated.profile.osx

{
"terminal.integrated.inheritEnv": false,
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.automationProfile.osx": {},
"terminal.integrated.profiles.osx": {
    
    "bash": {
        "path": "bash",
        "args": [
            "-l"
        ],
        "icon": "terminal-bash"
    },
    "zsh": {
        "path": "zsh",
        "args": [
            "-l"
        ]
    },
    "fish": {
        "path": "fish",
        "args": [
            "-l"
        ]
    },
    "tmux": {
        "path": "tmux",
        "icon": "terminal-tmux"
    },
    "pwsh": {
        "path": "pwsh",
        "icon": "terminal-powershell"
    }
}

}

Hope you can help me outenter image description here

  • Oh sweet lord!!! Thank you so much starball! This saved me another sleepless night!! Downgrading to v.2023.8.0 works! – Thomas Frissen Jun 12 '23 at 19:24
  • You're welcome! Let's please close this question as a duplicate of the other one so the answers can be found in one place instead of scattered about: [When I 'Run Selected' in Python on Visual Studio Code, it is suddenly opening up two Python terminals, one of which does not run my Python code](https://stackoverflow.com/questions/76451639/when-i-run-selected-in-python-on-visual-studio-code-it-is-suddenly-opening-up) – starball Jun 12 '23 at 20:32

1 Answers1

1

So @starball 's answer was the fix. This issue was raised Yesterday here:

https://stackoverflow.com/a/76453447/11107541

The fix is downgrading the Python extension in Visual Studio Code to v.2023.8.0