Repository navigation
Shift + Enter integrated python starts in shell #22499
Copy link
Copy link
Closed as not planned
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Type: Bug
When I have my cursor in a .py file on a line e.g. import math and click shift + enter the following happens:
- Integrated terminal opens with shell running
conda activate ...command is executed in shell (my environment)import mathis run (the .py line) in shell (which eventually fails)- Python terminal is opened
import math (the selected line) is executed before the python terminal was opened.
This is quite annoying because a import statement in shell actually does something (import-im6.q16).
Extension version: 2023.20.0
VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:50:47.800Z)
OS version: Linux x64 6.5.0-10008-tuxedo
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 x 3300) |
| 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 video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 1, 0, 0 |
| Memory (System) | 15.31GB (11.56GB free) |
| Process Argv | . --crash-reporter-id 7b9518d5-1aa3-4d00-a3a3-f30d4eeeb444 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | plasma |
| XDG_CURRENT_DESKTOP | KDE |
| XDG_SESSION_DESKTOP | KDE |
| XDG_SESSION_TYPE | x11 |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30880072
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
3biah626:30602489
89544117:30613380
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialogc:30887144
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
synctok:30869157
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixtcf:30871695
pythonregdiag2:30871582
pyreplss1:30886140
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:30885898
pythontbext0:30879054
dsvsc016cf:30886111
dsvsc017cf:30886113
dsvsc018cf:30886115
aa_t_chat:30882232
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Activity
anthonykim1 commentedon Nov 20, 2023
Hello, Marc Schwering (@mRcSchwering)
Can you try opting into "pythonTerminalEnvVarActivation" by adding
in your settings.json and see if you still get the behavior? Thanks
mRcSchwering commentedon Nov 20, 2023
I added it to
user/settings.jsonand now it works