Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
greubel
Level 7

Turn off debugger

Is there any way to turn off the debugging console within a DEV application ?
0 Kudos
10 Replies
EnTerr
Level 8

Re: Turn off debugger

Do you mean to stop PRINT for outputting to console? (and why would you want that?)

How about defining a function and always call that instead of print, then check for a flag inside. Something like:
sub cout(s1, s2="", s3="", s4=""):  'alas, log() is taken; cout = "console out"
if m._cout_off = true then return

print s1, s2, s3, s4
end sub

Extra toppings:

  • make fn print timestamp first

  • call with magic variable LINE_NUM as first argument (so that will know from which line* diagnostic comes)

  • peruse the little-known or used substitute() for printf-like functionality

  • extend functionality so it will dump (or pretty-print) nested objects, roXml etc

(*) unfortunately there is no equivalent _FILE_NAME (or such) magic to tell you from which BRS file is that LINE_NUM. :cry:
0 Kudos
greubel
Level 7

Re: Turn off debugger

What I want to do is come up with a side loader for my app and prevent anyone from being able to use the Telnet debugger to peruse my code.
I have a basic one working with encryption but that only prevents network monitoring. Also I have a CGI script to verify access from a Roku before the transfer.
0 Kudos
EnTerr
Level 8

Re: Turn off debugger

Making lemonade, i see!
But wouldn't such ability diminish the need of Roku's store, by making side-loading a practical means of app distribution?

What i am hinting at is RokuCo won't like it - last year they introduced this "screw-rity" feature of requiring http authentication for side-loading - from what i can tell for the sake of blocking an app like MyVideoBuzz from non-Roku-sanctioned distribution.
0 Kudos
greubel
Level 7

Re: Turn off debugger

I've had a lot of guys request a zip file for my package (NowTV) to side load. But that gives them access to everything !
They are side loading FLEX, I guess they don't care. But I don't want to release my code to the wild.
It would be nice if NowTV would allow our apps in their channel store.
I don't know, yet, how long it would take to load and Run() my app. Still working on it.
But this would essentially be a Private channel that doesn't get propagated through Roku.
0 Kudos
kc8pql
Level 7

Re: Turn off debugger

But this would essentially be a Private channel that doesn't get propagated through Roku.

So was MyVideoBuzz...
____________________________________________________________________________________________________________
No, I don't work for Roku.
Netflix Player N1000X, XDS 2100X (premature death by lightning)
Roku2 XD 3050X, Roku2 XS 3100R, Roku2 4210R
0 Kudos
greubel
Level 7

Re: Turn off debugger

Well I don't think it will work anyway. Takes way too long to load, 110 objects.
0 Kudos
TheEndless
Level 7

Re: Turn off debugger

The reason the NowTV box is locked down is because it's subsidized, and only costs 9 GBP.

I also didn't think you could side-load a pkg file, only zip. You used to be able to side-load a package file, but it was brought to Roku's attention that this would allow exactly what you're trying to avoid (breaking into the debugger and viewing the code), so they disabled it. I hope they haven't re-enabled it (for various reasons, not the least of which is the ability to provide a client with a package, without allowing them access to the source). The point, of course, being that you'd have to give them a zip file anyway, which renders the original concern moot.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Roku Employee
Roku Employee

Re: Turn off debugger

There is no way to completely protect your code at this time if you are delivering as a side loaded package. If Sky likes your channel they will add it to their platform. Please do not attempt to hack around the policies of our business partners.

- Joel
0 Kudos
greubel
Level 7

Re: Turn off debugger

What about these guys ?
How to turn Sky's £10 Now TV box into a networked media player with Plex, RARflix and MediaBrowser http://www.engadget.com/2014/04/08/sky-now-tv-plex/

I just wanted to see if it was feasible to do a general side loader with SSL. But without a way to turn off the debugging, it's not an option if you want to protect your code.
0 Kudos