clear the telnet (cmd) screen

Hi
As i find that clear the screen of cmd there is a command “CLS” for clearing screen. is there any command to clear the telnet screen. during coding i want to clear previous log.
please if you have any idea would be helpful.

No, I’m not aware of any version of telnet that has such functionality built in. You could do something like


BrightScript Debugger> for i = 1 to 60 : print : next

Or just hold down Enter until the screen clears.

–Mark

If you’re using a Mac, you’re probably using Terminal:
command-K “Clear Scrollback”
clears the screen.
Probably other terminal programs have a similar command somewhere.

Since he mentioned CLS, I assumed he’s using Windows, in a standard cmd window.

–Mark

“cpjamloki” wrote:
screen of cmd there is a command “CLS” for clearing screen

Ok so a cmd window in Windows has a command to clear the screen but it doesn’t work if you are telnet-ing in said command window?
Because Windows? Go figure.

Despite the way the question was worded, I took the question to mean: how do you clear the Roku’s console output, so that each time you start a new session you get a fresh, clean console log. Irrespective of whether you’re using telnet, a web browser, Windows or Macs, or any other method to view console output during debugging, every time you run a dev channel or side-load again, and connect to port 8085, you get the output from previous sessions. I’ve often wondered myself whether there was a way to clear that output without re-booting the Roku.

Ok i’m getting that sense like I might learn something here..
Is there a reason to have a clear console log other than personal tidiness? Or is it just that the particular app you use won’t clear the window for you?

I can’t speak for cpjamloki, but in my case, the answer is convenience. I’ve had a couple of situations where it would have been nice to know I was starting with an empty log. It was more of an issue with the long-standing bug wherein the debugger would crash every other invocation. Several times I thought I was looking at console output from the current session, whereas it turned out to be from a previous session. That’s not so much of an issue now that that particular bug has been fixed (and now that all my console output is timestamped). Another time I was logging data received over the network, unformatted Xml and Json. I wanted to analyze the data, so I would view the console output in my web browser, cut the output and paste into Notepad++ where it could easily be formatted and analyzed. It would have saved a few keystrokes if I didn’t have to search past the old output to get to the output from the last session where I was starting my copy. It’s obviously not an essential feature, nor even a request for such a feature – but it doesn’t hurt to ask if it’s possible does it?

the eclipse plugin has an option to “clear existing or open new console”

I never use that option so I don’t know how it works, but it may be worth checking out.

Yea it certainly makes sense if you’re using a web browser which obviously has no telnet-specific type features. I’ve only ever used Terminal on my Mac or phone so i’ve never really thought of it, plus you are doing a lot more of this work than I am.
And yes it never hurts ask, I suppose I’m just too cynical, I see the cobwebs on Enterr’s unanswered questions and don’t feel like suggestions have any way of moving up the food chain.

Depending on my mood I’ll click the Clear button in Eclipse every time I test the channel. Plus I set the log to be HUGE, so I can scroll WAY WAY up, whereas the Windows CMD window only holds so much and it’s not much at all.

Windows telnet can log to a file. I use that quite a bit. telnet -f c:\log.txt ipaddress portnumber

“squirreltown” wrote:
And yes it never hurts ask, I suppose I’m just too cynical, I see the cobwebs on Enterr’s unanswered questions and don’t feel like suggestions have any way of moving up the food chain.

Speaking of the food chain, maybe if the squirrels didn’t keep eating all the low-priority suggestions they’d get a response… lol…

“Komag” wrote:
Depending on my mood I’ll click the Clear button in Eclipse every time I test the channel. Plus I set the log to be HUGE, so I can scroll WAY WAY up, whereas the Windows CMD window only holds so much and it’s not much at all.
I’ve never used Eclipse. The couple of times I tried setting it up, I couldn’t get it to work. It didn’t like my javas or something, so I just gave up. I may give it another try when I get some free time, although I’ve pretty much set up Notepad++ to work as my BrightScript IDE (it’ll do syntax highlighting and formatting for BrightScript easily, and I’ve written a macro that will, with a single key press, zip my channel and deploy to my Roku(s), and another one that will connect to the debug console using telnet with a single keystroke).

If you’re interested, Komag, you can change the Windows command window buffer size. Click on the icon in the top left-hand corner of the window, select “Defaults”, then the “Layout” tab, then change the Screen Buffer Size, Window Size, and Window Position values to whatever you want. You can make the window as large as your screen if you want, with a buffer of up to 9999 lines.

“destruk” wrote:

Speaking of the food chain, maybe if the squirrels didn’t keep eating all the low-priority suggestions they’d get a response… lol…
Hey I resemble that remark :roll:
We squirrels be eating machines, just don’t ask us to clean up after.
Just noticed the typo, I hate that.

“belltown” wrote:
…I’ve pretty much set up Notepad++ to work as my BrightScript IDE (it’ll do syntax highlighting and formatting for BrightScript easily, and I’ve written a macro that will, with a single key press, zip my channel and deploy to my Roku(s), and another one that will connect to the debug console using telnet with a single keystroke).

I’m quite interested in this as I also use Notepad++ for IDE (I only use Eclipse as a glorified console). I’ve been setting language to VB to get syntax highlighting that is pretty close - do you do something else that is more accurate? I’m interested in your macros as well!

(and thanks for the tip about adjusting the Windows CMD window.)

PuTTY has menu options to clear the screen and clear the scrollback buffer. Highly recommended over the Windows telnet client.

-JT

“Komag” wrote:
I’m quite interested in this as I also use Notepad++ for IDE (I only use Eclipse as a glorified console). I’ve been setting language to VB to get syntax highlighting that is pretty close - do you do something else that is more accurate? I’m interested in your macros as well!
I made another thread with my Notepad++ instructions: http://forums.roku.com/viewtopic.php?f=34&t=83613

so long discussion here… but no reply is satisfactory.

“cpjamloki” wrote:
so long discussion here… but no reply is satisfactory.
If you want to clear the previous console log, I don’t believe there is any way to do that other than re-booting the Roku. The console log is stored in the Roku’s memory and regardless of what telnet client you are using, the log from a previous session persists, although some telnet clients do have the ability to clear the previous log entries from the screen display.

However, if you just want to clear your telnet screen when using the Windows Telnet Client, the following command should clear the current screen (or at least it does on my computer): ESC [ 2 J
I.e. press and release the esc key, then [ then 2, then press SHIFT and J at the same time. Then press the Enter key and you should get a BrightScript syntax error because the BrightScript debugger didn’t recognize that command, but the rest of the screen will be cleared of previous console output.