How Do You Clear the macOS Terminal Pad In Visual Studio For Mac?

Viewed 2191

I'm debugging a C# console application using Visual Studio for the Mac. I'm using frequent Console.WriteLine() statements.

Is there anyway to clear the output of the Terminal - macOS pad where the Console output is displayed every time I run / debug the program? I've tried calls to Console.Clear() to no effect. I have seen suggestions to use Cmd-K but that doesn't work. Other suggestions are all for VSCode, not Visual Studio.

enter image description here

Surely I can't be the only one who finds seeing the old output distracting when debugging?

5 Answers

You aren't alone. I was just wondering why it didn't clear the screen either. There is an option to use Terminal, instead of the built in terminal. Check under Preferences > Terminal, then remove the check mark next to "Enable Integrated Terminal" and it will just pop up in a normal terminal which doesn't seem to have that issue. If you figure something else out let me know though.

You may deactivate and reactivate the integrated terminal in : preferences\terminal options\uncheck\check. You may have to close VSFM between the uncheck\check process in order to clear the entre data. That way, it does clear the terminal data, but I would prefer some fast “clear” kind of short-cut options instead.

Have a good one.

Prog

Close the terminal window, then the next run will open an empty one.

I call Console.Clear() at first line each time Run project

I came here looking for the solution as I couldn't figure it out for the life of me, tried 'cmd + k' and it worked. I could have sworn I'd tried it in the past with no success. Maybe a few points that will help:

  • Have the terminal selected.
  • The terminal line has to empty.

New to coding, first stack overflow comment, hope this has some value.

Related