How do I clear the console screen in an LLDB session terminal? I know in GDB this is done with shell clear
(Ctrl+L
does not work for my case since I am running my LLDB session in VSCode debug console)
In the gdb case, shell clear
is spawning a sub shell and calling that shell's clear
command. Because the shell is sharing the same terminal with gdb, this acts to clear the terminal.
In the case of VSCode, lldb isn't directly connected to a terminal, it's just feeding text to VSCode through a socket. So it has no influence over the window VSCode chooses to display the text in. The VSCode-lldb interface would have to have a "clear your console" primitive for it to work in cases like this. That does not exist on the lldb side. I don't know whether it exists on the VSCode side.