-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Remote] Automatic Virtual Env does not work with fish shell (automatic shell integration not working) #23110
Comments
You might be running into: https://code.visualstudio.com/docs/terminal/shell-integration#_automatic-script-injection, due to which automatic shell integration might not be working for you: First of all, can you please provide the debug logs which can help diagnose the issue:
Output for
|
Oddly it does work for bash. manual installation worked, if I turn off the automatic integration. It's not clear to me why automatic won't work though, since I'm using the VsCode remote extension and it works fine for bash. Here is the requested Debug information:
|
Thanks, as you can notice Python extension does apply the variables to terminal correctly using automatic shell integration:
but for some reason VS Code's automatic shell integration is failing to apply it. Fish shell may have a complex shell setup preventing them from doing so. Closing in favor of #22879, where we can suggest users to use manual shell integration if automatic shell integration fails for them. |
So I've been doing more digging to try and find the culprit. It appears that I'm running into the same issue. It seems to be starship that's causing the issue in fish. Unfortunately I prefer to use fish, so I'm going to have to dig into this elsewhere. Appreciate the help! |
I see thanks for letting us know about this. If even manual shell integration isn't working for you I strongly recommend to please file it on VS Code: https://github.com/Microsoft/vscode and they'll have a solution for you, make sure to @ me and I can help out. I highly suspect you might be running into a very similar issue: microsoft/vscode#205133 (comment), which was recently fixed in the latest VS Code insiders: microsoft/vscode#206994. So you might want to try that. |
The insiders build did not fix the issue, but there is an issue on the Starship github now regarding the problem, that may fix it. In the meantime in case anyone stumbles on this, the manual install appears to work if you turn off This may not be desirable, however the following seems to work even with that turned on:
|
The issue should be fixed with microsoft/vscode#208465. Thanks for letting us know that unsetting |
Type: Bug
My virtual environment is not automatically activated when the fish terminal is launched.
Expected
My virtual environment is automatically activated when fish shell is opened.
vs. Actual
Terminal provided notification that VENV has been activated but it has not.
XXX
Steps to reproduce:
Here is the environment changes it claims occurred:
here's an example of proving it's not activated:

Pip list also shows that the correct python modules are not loaded.
Diagnostic data
python.languageServer
setting: PylanceXXX
languageServer: "Pylance"
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30992800
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
pydisww2:30991134
cppperfcontrol:30979541
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:30992953
gee8j676:30988843
The text was updated successfully, but these errors were encountered: