IDE - Help Newbie Declutter the Terminal


#1

Hello,
I am using the Visual Studio Code for running code.
The file path is always recalled every single time I edit and run the code again(by pressing F5).

So it is full of clutter- not easy to read the output.
I can use the output panel too, but it is not as direct.
(attached screenshot)

          How do we sort this out?
            Thanks , 
                                 Zefy

#2

Hey Zefy, welcome to the forums.

I would suggest you try clicking on each of the buttons and their options. Or, simply go to the Visual Studio documentations:


#3

Thanks for the reply _markviii.
I have tried mutilple things. Searched through the documentations and googled it a LOT.
A few tech geek friends looked it up. They didn’t seem to find what to do.
I was hoping for some more specific advice cause nothing seems to work :’)


#4

You know what, Zefy?

If you’re really willing to clean your terminal, then just close Visual Studio, and open it again. I can’t think of anything else but that.

You’re welcome :slight_smile:


#5

I obviously cannot close and open the program every single time I run my code …

I need a way to make it skip recalling the full FilePath every time F5 is pressed.

Thanks for your help.


#6

What makes it hard to read? Your program starts under the blue stuff doesn’t it?
Perhaps your program would like to print a bunch of blank lines before it does anything else.
Or maybe you could edit your F5 binding so that it also runs clear or maybe a program of your own making which prints empty lines.

If you’re trying to run your program multiple times without any output between them at all, then you could write a program which repeatedly runs a command each time it’s told to do so. That’s not entirely trivial though, because you’d have to tell it to restart…without telling it through the terminal (would have to go via network or file system or other shared memory…and you’d probably want it to run at the same time as your own program so now we’re talking about concurrency as well)…That’s probably similar to what that command is itself doing by the way, in order to send text to your output tab. But is the problem really big enough to care that much? You probably can’t do it yourself, and whoever makes the python plugins you’re using might (rightly) think a narrow-use-case feature like F5 isn’t worth it, or that this isn’t at all how it should behave, or that there’s some fundamental problem with the idea.

Have you considered running the program yourself from the terminal, maybe in a separate window because your editor doesn’t really need to be involved does it? Because this is exactly the kind of thing that a terminal is for.

I imagine pycharm has this better figured out. But that has other problems, like one whole editor for just one language, and that it inserts itself into your program for debugging purposes and such in ways that might cause you more trouble than it’s worth because you don’t know how it does that and if you did you could do it yourself without the middle man.

So, no I’m not suggesting pycharm. Rather I am suggesting that you treat your editor and your program as separate things!


#7

There are programs that can monitor file updates.
One is the ruby gem guard, and it has a plugin guard-process which could be used here.
A big bonus is that it’s not tied to any editor or such, it’s much more flexible than that.

https://asciinema.org/a/nkkxuyogdL3ShJZWVz97415Z8

No clue if it works on windows. It just might. You might need to learn a whole bunch to even install it, it’s not exactly a typical windows app with a graphical installer.

https://github.com/guard/guard
https://github.com/guard/guard-process