UPDATE 2.0! Visual Studio Code's unwanted terminal path
Why Stack Overflow recommends it
Stack Overflow users link it when answering how to hide the file path noise in the VS Code terminal, usually by pointing to the "console": "internalConsole" setting in launch.json.
Recommended by 1 people across 1 different months, 2021 to 2022.
What it is
A short screencast by Reynald Adolphe showing how to edit launch.json in Visual Studio Code so program output appears in a clean debug console instead of the terminal with the long file path printed before it. It is an update to an earlier video and notes the settings needed when a program reads input.
What people said
Recommends jerome · 2021-01 · Stack Overflow · on “VS Code Terminal Java Hide Path”
This will work, but you'll run into an error message when using a Scanner object. The best solution I've found so far is to create two configurations in the settings.json file. I have... { "type": "java", "name": "In Debugger", "request": "launch", "mainClass": "${file}", "console": "internalConsole" } ...when I want to run it in the debugger console and have a cleaner output, and... { "type": "java", "name": "Int Terminal", "request": "launch", "mainClass": "${file}", "console": "integratedTerminal" } ...when I need to run it into the terminal. Though this video shows how to set it up for Python, it works pretty much the same for Java: [this video]
Cites Miroslav · 2021-12 · Stack Overflow · on “Visual Studio Code clean terminal”
They are modifying launch.json but it doesnt work for my and they are using other language too btw original video is here [this video]
Cites CloudyBytes · 2022-09 · Stack Overflow · on “How can I hide the file path in the terminal window in vs code?”
under such realities it's better to just have it log to your Debug Console without the extra crap... "console": "internalConsole" (this really means DebugConsole tab) "internalConsoleOptions": "openOnSessionStart" (this forces the DebugConsole tab to open upon launching ) { "configurations": [ { "type": "java", "name": "Java: Current File", "request": "launch", "mainClass": "${file}", "console": "internalConsole", "internalConsoleOptions": "openOnSessionStart" } ] } P.S Or check this YT video where guy is dealing with same issue: [this video]