Skip to content Skip to sidebar Skip to footer

How To Hide The File Path Displaying In Visual Studio Code's Terminal

After I run my python code on the terminal, it displays a few paths in the 1st line and then the actual output of my code in the 2nd line. Can I hide the 1st line so I only see the

Solution 1:

  1. You could use the following settings in launch.json in the .vscode folder, and "console": sets the way the code debugging results are displayed.

"console": "internalConsole",

After setting it, the debugging result will be displayed in the "debug console" inside VSCode.

enter image description here

  1. We could also set it as:

"console": "externalTerminal",

and the debugging results will be displayed in the "cmd" window outside VSCode. It also only displays the debugging results:

enter image description here

  1. VSCode uses by default: "console": "integratedTerminal", it displays the results in the VSCode internal terminal, and displays the current environment and the path of the running file.

Reference: console.

Solution 2:

The above answer works for displaying the output as desired however if you want to hide the long path

use prompt [text]

For example, the following command sets "> (greater-than sign)" as prompt

prompt $g

if you want to return back to showing full path just type prompt and press Enter.

Post a Comment for "How To Hide The File Path Displaying In Visual Studio Code's Terminal"