[Python] In VSCode with python extension why does a powershell of terminal prompt not show the...

Discussão em 'Python' iniciado por Stack, Fevereiro 21, 2025.

  1. Stack

    Stack Membro Participativo

    I found the same problem which is with a path containg brackets.

    When the path contains square brackets, spawning a new terminal using powershell and "terminal.integrated.cwd" does not function properly


    I open two folders with VSCode.

    One folder hello to the right with a powershell of terminal panel by default showing current working directory where hello is.

    The other folder to the left with a powershell terminal panel by default showing a folder under


    C:\WINDOWS\System32\WindowsPowerShell
    ​

    instead of the folder I open.

    [​IMG]

    I tried to use cd command to change the cwd shown in the powershell terminal of panel and restarted my VSCode.

    But it does not work.

    Here is the settings.json which only contains


    {

    "workbench.iconTheme": "vscode-icons",

    "workbench.colorTheme": "Solarized Light",

    "python.terminal.executeInFileDir": true

    }
    ​

    but the powershell of terminal panel to the left VSCode still shows a folder under


    C:\WINDOWS\System32\WindowsPowerShell.
    ​

    [​IMG]

    I also tried to check


    prython > terminal: execute in file dir
    ​

    in the setting of VSCode.

    It does not work.

    How do I set each folder I open in VSCode and then poweshell of terminal panel shows corresponding folder I actually open instead of the same folder under


    C:\WINDOWS\System32\WindowsPowerShell?
    ​

    It seem only the folder to the left occurs this situation.

    Continue reading...

Compartilhe esta Página