0

BrightScript errors

How can I log and view errors occurring in BrightScript? I tried using the telnet terminal, hoping it would log errors, but saw nothing there. Just get the red LED flashing on the DX player. But would like to get some more useful feedback. Also, is there any other method for "debugging" or testing scripts, e.g., using the BA simulator or similar?

 

-JM

4 comments

  • 0
    Avatar
    Lyndon

     

    when the unit crashes, if you go to the log tab on the player (if the diag server is enabled), you see the script error there. If you press the svc button when the unit's crashing due to the script, it drops you to the brightscript debugger where you can see the last line and check the status and values in various variables and objects.

     

    Are you writing a plugin? There isn't a debugger, but there's an older script app that hasn't been updated for a while but will work with scripts so long as you're not using newer objects. Some objects that aren't supported include udp for example or rotexttwidget.  

  • 0
    Avatar
    Jean Michel

    Thanks! Are those two methods of viewing errors/logs documented somewhere? I couldn't find them.

    I'm writing some BrightScript that extends the HTML widget with some additional functionality, and the interaction between BS and JavaScript is sometimes a bit hard to figure out for someone coming from a JS background without much BS experience. But your pointers help.

    Some sort of "IDE" with syntax checking,and a proper debugger, would of course help tremendously. As would some basic way to quickly edit and re-run scripts (e.g., via the Diag server), without having to update files on the SD card, plug it in, reboot, and hope for the best. Perhaps I'm again overlooking something obvious here?

     

    -JM

  • 0
    Avatar
    Romeo

    Hi Jean-Michel,

    http://support.brightsign.biz/entries/22815548-toolchain-utilities

    from the above link you will find the "BrightScript Syntax Highlighter Extensions" which should help with the Syntax checking.

    I have also attached a tool (QA_Automate.exe ) which will allow you to upload/write/overwrite a file (can be an autorun.brs or myplugin.brs or anything you'd like) to the player and reboot the player with just 1 click.

    in order to use the QA_Automate.exe  you'll need to ensure that the Diagnostic Web Server is enabled (as per Diagnostic Web Server User Guide.pdf)

    1) Enter the IP address of the player in the main field and click "Check" if the connection is successful you should see the Model number, Serial Number, FW version, Storage size of the player and time Checked at the bottom of the window.

    Check_Player.PNG

     

    2) Select upload File from the dropdown list >  Add > Select  "File" (NOT "Root Folder") > Navigate to the script you want to upload to the player.

    Under "Target Name" enter the name that you want to upload the selected file with > OK.

    Please note, if you're writing a standalone script then the Target name must to be "autorun.brs" otherwise if you're writing a plugin or a library file it can be any name that you'd like with a .brs extension 

     Upload.PNG

     

    3) Select Restart from the drop Down menu > Add > choose 10 seconds for the reboot command > OK

    Please DO NOT set the Restart value time below 10 seconds.

    Restart.PNG

    At this stage you should be able to make any modification to your script in your text editor, save those changes, then use the QA_Automate.exe tool to upload the newly saved file and reboot the player by clicking the "Run Test" button.

    You should keep an eye on the right pane for the upload status to ensure whether or not the file upload succeeded.

    Run_test.PNG

    You can debug a script either via on-board Serial (RS232) output or via Telnet. I'm also attaching some documents that describes how to use them.

    I hope this makes sense.

    Regards,

    Romeo

  • 0
    Avatar
    Marcus Garfunkel

    Romeo,

    Can you resupply your link to your "QA_Automate" application?

    Sincerely,

    Marcus

Please sign in to leave a comment.