Applet Debug Over Weinre

Have more questions? Submit a request

The debugging is crucial and we know it. To make it as smooth as possible within large amount of very different devices we developed remote Applet debug over Weinre.

Introduction to Weinre Debug

Weinre is a tool by Apache foundation that enables to remotely login into the web layer on the devices and do Chrome-inspector-like actions.

weinre_01.png

Prerequisities

  • Device connected to signageOS (working internet connection)
  • Older Chrome version (link here)

Comparison table of debug options:

Debug type Notes
Remote Weinre Debug Weinre (described below) is mainly used for debugging on devices that are outside of your local network (installed at the client premises). It uses real-time websocket communication to bring you DOM and console logs
Native Debug Native Debug is specific for each platform and can be used for debugging and troubleshooting with devices on local network. It's more precise, faster and more reliable.

How to use it

To enable the Weinre debug, you have to use Core App with a Front Display version > 8.4.0 and Front Applet (JS API) > 4.9.0.

Platform Min. Core App Version
Samsung Tizen >= 2.1.1
LG webOS >= 2.2.0
Raspberry Pi >= 1.5.0
Android >= 3.7.0

enable-weinre-debug.png

  1. Navigate to device detail page
  2. Select Debug tab
  3. [1] Enable Weinre Debug
    1. Select [2] Applet debugger link to open Applet inspector.
    2. Select [3] Core App debugger link to open Core App inspector

Never keep the Weinre debug enabled for production devices. It's meant only for on-demand debugging.

Legacy & Manual way of enabling Weinre debug

If you want to enable the remote debug manually from your Applet, add the following snippet into your Applet:

<script type="text/javascript">
    window.WeinreServerURL = 'https://weinre.signageos.io';
    window.WeinreServerId = '...some string to identify your device on weinre, used after #...';
</script>
<script type="text/javascript" src="https://weinre.signageos.io/target/target-script-min.js"></script>

Navigate to the following URL: https://weinre.signageos.io/client/#...some string to identify your device on weinre

Example: https://weinre.signageos.io/client/#my-tizen-device

Debug 🙂

Limitations

Weinre will never show any console.log(), errors etc. from iframes, frames etc. below & even above. It works only for current JS thread (iframe).

Was this article helpful?
0 out of 0 found this helpful
Share