You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shift + Enter integrated python starts in shell #22499
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 math is 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)
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