-1

enter image description herehow to remove this yelow and blue text ?

i didn't try anything, cause i don't know what to do

  • 2
    Uh, are you trying to remove the file location? Or the text? Neither of which makes any sense to do... – 12944qwerty Feb 23 '23 at 18:14
  • The text is run in the terminal to run the python file you are coding in. If you don't have that... you can't run the code. You _can_ shorten it if python is added to PATH... `python mozenie .py`. I don't see why you would want to remove either file though – 12944qwerty Feb 23 '23 at 18:15
  • Maybe that space in the filename is causing problems. Try renaming the file, so instead of being called `mozenie .py` with that space just before `.py`, call it `mozenie.py` without the space. – GregHNZ Feb 23 '23 at 18:40
  • 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) – starball Feb 23 '23 at 19:42
  • that is the way VSC starts the Python debugger, you can't change it, what method so you use: Code Runner???? – rioV8 Feb 24 '23 at 03:36

1 Answers1

0

I've seen this question countless times. I want to tell you that this is how vscode works, why not get used to it. Vscode uses the system terminal as an integrated terminal, uses the terminal and displays shell commands when executing scripts, there is no problem.

If your goal is to get output without displaying shell commands, an alternative is Code Runner. Install the extension and add the following in settings.json. You will see the result in the OUTPUT panel.

    "code-runner.runInTerminal": false,
    "code-runner.clearPreviousOutput": true,
    "code-runner.showExecutionMessage": false,

enter image description here

But please note that if there is no special requirement, it is recommended that you use the official Python extension to execute the script. Because Code Runner is not an extension specially developed for a certain language, it is applicable to multiple languages, but it is limited to executing code. In addition, in the OUTPUT panel above, the code cannot receive user input.

Therefore, please accept the shell command of the terminal, which has no bad effect, but clearly shows the running path of the code, etc.

JialeDu
  • 6,021
  • 2
  • 5
  • 24