Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pmd333
Visitor

Brightscript logging and error handling

hi,

I am new to channel development and would like to make a simple arithmetic app. I would like to put in logging and error handling into my bs in the beginning, but I'm not experienced in doing that because I have usually relied on a debugger for that instead. It would be nice to also eventually turn the logging into something that could be used for tracing user problems and logging some statistics on user behavior to a server. So I'm tempted to do something strange like rely on the eval/run commands, but I'm trying to resist. I'm hoping someone more experienced can provide some tips.

Thank you,
pmd
0 Kudos
8 REPLIES 8
dev42
Visitor

Re: Brightscript logging and error handling

"pmd333" wrote:
So I'm tempted to do something strange like rely on the eval/run commands

I'll parrot what the guru's around these parts have said, "don't use eval/run". That said, if you're looking to make a data driven app that pulls "lessons" / "levels" from the 'net, I'm sure it can be done!

I'm also sure you can do logging and save it to the 'net.... but unfortunately, I don't know how ( yet ) and I'm not well versed in the privacy concerns. You can fetch an ID/model # from the unit, but what if your demographic included families with more than one student? or twins?!
0 Kudos
pmd333
Visitor

Re: Brightscript logging and error handling

It looks like someone posted a library to help get started called librokudev on github. I will start there.
0 Kudos
pmd333
Visitor

Re: Brightscript logging and error handling

Also someone posted brstest on github. Maybe I can use that to help with testing and cut down on the need for logging and error handling.
0 Kudos
sna
Visitor

Re: Brightscript logging and error handling

Hi,

I'm new to ROKU, I'm just exploring how to use brstest. If anybody can let me know how can I use brstest with example programs will be very helpful and appreciated.
0 Kudos
sjb64
Roku Guru

Re: Brightscript logging and error handling

Might be a dumb question but...

If you wrote an app that downloaded an external file to a string or tmp:/ (containing code) that was then processed using Eval/Run, could that app even pass QA for a public channel? There would be no way to test the future downloaded code to ensure it met standards and rules (not a menu system, etc.), as the code could be changed at will after publication.
0 Kudos
renojim
Community Streaming Expert

Re: Brightscript logging and error handling

Part of the Developer Agreement states: "The Channel Applications will not download or install executable code." Seems to me that downloading BRS and executing it with Run/Eval would violate this. I'm not sure how long that clause has been around since I know of at least one very old public channel that did just that.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Komag
Roku Guru

Re: Brightscript logging and error handling

I don't think that counts, you would be downloading brightscript code, which I would interpret is just passive code, not downloading and running some sort of exe file, which I think that rule specifically is talking about. But of course I may be wrong.
0 Kudos
sjb64
Roku Guru

Re: Brightscript logging and error handling

On a Roku with the eval/run ability, Brightscript is executable code, so I think it would definitely be the target of that clause. I don't know if anyone at Roku actually unzips the package and looks at source code, either manually or by an automated system looking for triggers so see if clauses like there are violated. But regardless, my concern, which it turns out TheEndless has addressed previously in the forums, is addressed.

On a side note, I didn't mean to hijack pmd333's thread, if anyone wants to continue this discussion let's start a new thread.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.