-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Extension not honoring terminal.integrated.automationShell #14221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mbikovitsky Just to confirm. |
I do not have any pre-launch tasks configured. The behaviour I'm observing is that if the integrated terminal is set to PowerShell and the automation terminal is set to It looks like the debugger tries to use the automation shell, instead of the integrated one. |
If this is causing issue then, I recommend turning activations off and launch vscode from an activated environment. As for the issue itself, the debugger does not select the type of shell it runs it. This is done by VSCode, python extension or debugger are not involved in this. |
Could the Python extension at least detect what kind of shell it runs in? |
In the case of the debugger extension is not involved (at least directly). The debugger gives the command it expects VS Code to run via Then there is the issue of activation itself. Sending command to the terminal, currently this results in a race where command that gets sent first to the terminal determines if the environment is activated or not. This means sometimes the activation command is sent after the debugger command. We have a bunch of items to improve terminal experience, #8907, #4568 |
Environment data
python.languageServer
setting: PylanceExpected behaviour
When launching a debug session, the extension should issue commands suitable for the shell specified in
terminal.integrated.automationShell
, if this setting is defined, instead ofterminal.integrated.shell
.Actual behaviour
VS Code indeed launches the shell specified in
terminal.integrated.automationShell
, however the extension issues commands suitable forterminal.integrated.shell
.For instance, if
terminal.integrated.shell.windows
points to PowerShell andterminal.integrated.automationShell.windows
points tocmd.exe
, the extension erroneously issues the& path/to/virtualenv/Scripts/Activate.ps1
command.Steps to reproduce:
To reproduce on Windows:
terminal.integrated.shell.windows
to"C:\\Program Files\\PowerShell\\7\\pwsh.exe"
.terminal.integrated.automationShell.windows
to"C:\\Windows\\System32\\cmd.exe"
.The text was updated successfully, but these errors were encountered: