In visual studion code, after installing python, I added a debug configuration provide by visual studio code (called 'current configuration') that lets me run python. I'd like the output of my executed python code to be clean and NOT show this long path every time (in blue text). How can I do this? See image attached.
Asked
Active
Viewed 1,195 times
2

myfunnyfella
- 1,357
- 3
- 18
- 25
-
Does this answer your question? [How to hide file paths when running Python scripts in VS Code?](https://stackoverflow.com/questions/61176552/how-to-hide-file-paths-when-running-python-scripts-in-vs-code) – Gino Mempin Feb 05 '21 at 14:18
3 Answers
1
Make sure that your launch.json configuration console setting is set to "internalConsole"

Tyler Shepherd
- 11
- 1
0
Unfortunately there is no way to avoid that output as it's required to launch the debugger.

Brett Cannon
- 14,438
- 3
- 45
- 40
-
Is there not a way to run the prg like it does when I type in “dotnet run” but without having to type in “dotnet run”? – myfunnyfella May 25 '18 at 03:15
-
If you simply want to run the script without debugging you can use the `Run Python File in Terminal` command. – Brett Cannon May 28 '18 at 19:33
-
How can is set the environment so when I debug it goes to the output window by default rather than the terminal? – myfunnyfella Jul 06 '18 at 11:52
-
@myfunnyfella you can't; it either goes to the integrated terminal or an external terminal. – Brett Cannon Jul 10 '18 at 22:18
-
Actually figured it out. Had to specify no console in configuration and output comes out nicely in debug window without ugly long path. – myfunnyfella Jul 11 '18 at 02:16
-