How to Hide File Path in VS Code Terminal Output & Delete Clutter Messages in Code Runner Extension
Mar 1, 2026
Get the full source code of application here:
Show More Show Less View Video Transcript
0:00
Uh hello guys in this video I'll show
0:02
you how to hide the file path while
0:04
running your any sort of code inside VS
0:07
code. So by default let's suppose we
0:09
have this Python file that we are
0:10
running. So when we click run Python
0:13
file. So what happens right here inside
0:15
the terminal it actually shows all these
0:17
clutter messages alongside with the file
0:20
path as well. So what file you are
0:22
running. So if you want to hide this and
0:24
get a clear output only the output that
0:26
you want then in that scenario you need
0:29
to use an extension which is a really
0:31
popular extension which is coderunner.
0:33
Codeunner is actually a great extension
0:36
for running all sort of programs in
0:38
different programming languages. It's
0:40
got almost 39 million downloads. So
0:42
first of all you just need to install
0:44
this extension. So after installing this
0:46
extension you need to go to its
0:48
settings. So just click the settings
0:50
option and go to its settings. So first
0:53
of all you need to uh check mark this
0:56
option. By default it's checked which is
0:58
clear previous output. So just tick mark
1:00
this option and then
1:04
just scroll here and you just need to
1:07
tick mark this option. So it will be
1:08
checked by default. Just make sure that
1:10
it is checked and then also just untick
1:14
this option. By default it will be
1:16
unticked. So by mistake if you have tick
1:19
this option so untick this option show
1:21
execution message. After that you need
1:24
to go inside this executor map.
1:28
So just take just click this button edit
1:30
in settings.json. So for all the
1:32
programming languages this extension
1:34
runs here. So whichever programming
1:37
language you are working with. So let's
1:38
suppose we are working with Python right
1:40
here. You just need to add this line of
1:42
code here. If you are on Linux, you just
1:44
need to write here clear. And so if you
1:48
are on Linux, but if you are on Windows,
1:51
in my case, I am on Windows. So I will
1:53
write here cls. So this will clear out
1:55
the previous output and then run this
1:58
actual code. So that's all that we need
2:01
to do right here. After that you again
2:04
run the same file once again. So if you
2:07
now see there will be this option added
2:09
which is run code. This option is coming
2:11
because of this coderunner extension. So
2:15
if you click run code, so now what
2:17
happens you will get a clear output. So
2:20
as you see,
2:22
let me restart everything. Let me kill
2:25
the terminal and was again run this. So
2:29
once again you click run code. So now
2:32
what happens? You only get
2:35
this uh clear output. So now if you see
2:42
you only get the clear output in this
2:44
easy way you can hide the file path and
2:47
also if you are running Python 3 you can
2:49
add this Python 3. If you are running
2:52
Python 3 so you can do this as well. So
2:55
again if you do this
2:59
I think we have selected this option run
3:01
in terminal. So just make sure that you
3:03
select this option. So after that once
3:05
again you do this run code. So now you
3:09
will see the input function will also
3:11
work. So previously the input function
3:13
was not working because we haven't added
3:15
that Python 3. So if you are using the
3:19
latest version of Python. So just make
3:20
sure that you add Python 3 as well. So
3:23
now we can even use the input function.
3:25
So as soon as we take the input we
3:27
display the output. So in this easy way
3:29
you get a c crystal clear output and you
3:32
actually delete all those clutter
3:34
messages and the file path you can hide
3:37
that file path so you get a clear
3:40
output. So personally I use this setup
3:42
by using this coderunner extension and
3:44
just follow the step-by-step instruction
3:46
that I showed you and you will be able
3:48
to hide the file path and get a clear
3:50
output while running your code in VS
3:53
code. So definitely check this out.
3:55
Please hit that like button, subscribe
3:57
the channel and also comment if your
3:59
problem is solved.
