microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.31k stars 1.18k forks source link

Starting in v2024.4.1, extension mangles vscode integrated terminal path #23236

Open djsavvy opened 6 months ago

djsavvy commented 6 months ago

Type: Bug

Starting in v2024.4.1, this extension started mangling my integrated terminal path. Now, for instance, I can't run yarn dev because the dependencies in the scripts are no longer found.

Extension version: 2024.4.1 VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) W-1370P @ 3.60GHz (16 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.75GB (11.41GB free)| |Process Argv|--crash-reporter-id 26bf80c7-ebf8-4932-96de-41d3d273eedc| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 8082a590:30971561 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 jchc7451:30973076 gee8j676:31009558 dsvsc021:30996838 g1icg217:30999571 jg8ic977:31013176 ```
karthiknadig commented 6 months ago

@djsavvy Can you provide more details? is the PATH env variable not right or is it something else? Also, can you share the logs from Output > Python.

djsavvy commented 6 months ago

Yeah the PATH env variable is not right. If I copy the PATH env variable from Windows Terminal and set it in the integrated terminal, then my yarn commands work. I also used Extension bisect to narrow it down to this extension specifically.

Strangely, when the PATH variable is messed up, it seems to be a superset of the good PATH. A lot of the directories seem to be duplicated.

I tried messing around with it a bit more today with various combinations of disabling/enabling the extension, and installing/updating/uninstalling. It seems like the issue was being triggered intermittently. I was able to see it in 2024.4.0, but also managed to get a good state with 2024.4.1 after a reinstall.

Is it possible that reinstalling resets the a/b testing, and that the issue is actually because an A/B test? In that case it might be a specific combination of some A/B test and the 2024.4.1 version that triggers the bug.

djsavvy commented 6 months ago

To be honest, I'm suspecting that one of the A/B tests in my issue above is causing the bug. I opted out of all tests in my settings and reinstalled the plugin and am not seeing the issue anymore.