microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.89k stars 29.52k forks source link

(venv) identifier not showing in VS Code Insider's integrated terminal (WSL2 Ubuntu), but is showing in Terminal Preview #169195

Closed lost-in-the-canvas closed 1 year ago

lost-in-the-canvas commented 1 year ago

Type: Bug

Hello folks of Team of Visual Studio Code,

Currently having an issue in which the (venv) identifier that traditionally appears in the bash shell when activating a virtual environment in a Python is not appearing in my Visual Studio Code - Insider's Edition integrated terminal in a bash shell from Ubuntu Preview on WSL2.

For some reason, the (venv) identifier does appear in a bash shell from Ubuntu Preview on WSL2 when running with Terminal Preview.

Refer to the images below. Notice how Terminal Preview displays (whatever) in the prompt of the bash shell when the python virtual environment is active... Depiction of desired result in Terminal Preview

Depiction of undesired result in VS Code


I suspect that the issue has to be somewhere in my VS Code's setting, but I don't know what setting could make this possible. I have outputted my User > Settings.json for VS Code but nothing that I set should have this effect.

{
    "editor.inlineSuggest.enabled": true,
    "editor.fontFamily": "'CaskaydiaCove Nerd Font', Consolas, 'Courier New', monospace",
    "editor.fontSize": 12,
    "editor.tabSize": 2,
    "explorer.confirmDelete": false,
    "[python]": {
        "editor.formatOnType": true
    },
    "C_Cpp.clang_format_fallbackStyle": "Chromium",
    "workbench.iconTheme": "vscode-icons",
    "workbench.colorTheme": "GitHub Dark Default",
    "terminal.integrated.fontSize": 12,
    "editor.accessibilitySupport": "off"
}

Any insight or guidance would be appreciated. Thank you and happy holidays!

VS Code version: Code - Insiders 1.75.0-insider (11238faea62d570d77afe6edfe05c8b732c44a2b, 2022-12-13T05:22:12.417Z) OS version: Windows_NT x64 10.0.22623 Modes: Sandboxed: Yes Remote OS version: Linux x64 5.15.79.1-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.84GB (2.21GB free)| |Process Argv|--crash-reporter-id 9a802d49-64d0-4fff-97f3-0acf66865dfb| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu-Preview| |OS|Linux x64 5.15.79.1-microsoft-standard-WSL2| |CPUs|Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)| |Memory (System)|7.68GB (4.64GB free)| |VM|0%|
Extensions (61) Extension|Author (truncated)|Version ---|---|--- vscode-firefox-debug|fir|2.9.8 codespaces|Git|1.13.4 remotehub|Git|0.49.2022121401 vscode-edge-devtools|ms-|2.1.1 jupyter-keymap|ms-|1.0.0 remote-containers|ms-|0.268.0 remote-ssh|ms-|0.95.2022121315 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.72.0 vscode-remote-extensionpack|ms-|0.23.0 azure-repos|ms-|0.25.2022121301 remote-explorer|ms-|0.1.2022121209 remote-repositories|ms-|0.27.2022121401 vscode-icons|vsc|12.0.1 codestream|Cod|14.11.0 vscode-markdownlint|Dav|0.48.1 vscode-eslint|dba|2.2.6 gitlens|eam|2022.12.1404 codespaces|Git|1.13.4 copilot-nightly|Git|1.63.7607 remotehub|Git|0.48.0 vscode-pull-request-github|Git|0.57.2022121409 vscode-azureresourcegroups|ms-|0.5.6 vscode-docker|ms-|1.23.2 csharp|ms-|1.25.2 dotnet-interactive-vscode|ms-|1.0.3611021 vscode-kubernetes-tools|ms-|1.3.11 isort|ms-|2022.9.13271012 python|ms-|2022.21.13481008 vscode-pylance|ms-|2022.12.21 jupyter|ms-|2023.1.1003441034 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.12 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 azure-account|ms-|0.11.2 azure-repos|ms-|0.24.0 cmake-tools|ms-|1.12.27 cpptools|ms-|1.13.7 cpptools-extension-pack|ms-|1.3.0 powershell-preview|ms-|2022.12.1 remote-repositories|ms-|0.26.0 vscode-typescript-next|ms-|5.0.202212130 vsliveshare|ms-|1.0.5788 vsliveshare-audio|ms-|0.1.91 vsliveshare-pack|ms-|0.4.0 vscode-react-native|msj|1.10.0 java|red|1.14.2022121311 vscode-yaml|red|1.10.1 rust-analyzer|rus|0.4.1319 cmake|twx|0.0.17 vscode-lldb|vad|1.8.1 intellicode-api-usage-examples|Vis|0.2.6 vscodeintellicode|Vis|1.2.29 vscode-arduino|vsc|0.4.12 vscode-java-debug|vsc|0.47.2022112823 vscode-java-dependency|vsc|0.21.2022111900 vscode-java-pack|vsc|0.25.2022112900 vscode-java-test|vsc|0.37.2022090902 vscode-maven|vsc|0.40.2022121203 vscode-icons|vsc|12.0.1 (4 theme extensions excluded)
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30422396 pythontb:30258533 vsc_aacf:30263846 pythonptprofiler:30281269 vshan820:30294714 pythondataviewer:30285072 vscod805:30301674 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30404738 cppdebug:30492333 vsclangdf:30492506 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30618038 pylantcb52:30590116 pyindex848:30611229 nodejswelcome1:30587009 pyind779:30611226 dbltrim-noruby:30604474 pythonsymbol12cf:30622697 fim-prod:30623723 ```
lost-in-the-canvas commented 1 year ago

Alright, I simply restarted my machine and it appears now. I have no idea why this is the case, but its fixed!

Guess the old adage of turn it off/then turn it on still reigns true.