Inconsistent behavior of "Run Python File" command #25466
Replies: 3 comments
-
Would anybody be able to help with this? |
Beta Was this translation helpful? Give feedback.
-
I’ve seen this happen too. The --live-stream flag isn’t something you can flip on with one setting, it’s added automatically depending on how the VS Code Python extension runs your code. On the computer where it’s missing, open your VS Code settings (Ctrl + ,) and search for Python: Terminal. Make sure it’s set to use the integrated terminal instead of the output window. That’s usually what controls whether live output shows up. If it still doesn’t behave, you can force it by editing your settings.json and adding:
That will tell VS Code to always add the flag when it runs your Python files. |
Beta Was this translation helpful? Give feedback.
-
Hi! Depending on if you in the experiment or not described here you may see different behavior but I am trying to unify it. If you could add |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm experiencing different behavior when running Python files through the VSCode Python extension using the "Run Python File" command on two different computers. Both installations were configured as default with miniforge for conda, and the same versions of Windows 11, VSCode, Python, and the Python extension.
Computer 1 (working correctly):
Command executed: conda run --name [name-of-env] --live-stream python [path-to-python-file]
Behavior: Shows real-time output in the terminal as the script runs
Computer 2 (problematic):
Command executed: conda run --name [name-of-env] python [path-to-python-file]
Behavior: No output appears in the terminal during execution; all output is only displayed after the application exits
The issue is that Computer 2 is missing the --live-stream flag, which prevents real-time output streaming. Are there any ways that I can configure to include the --live-stream flag?
Beta Was this translation helpful? Give feedback.
All reactions