browserremote-debuggingweboslg

Remote Debugging Website on LG WebOS Browser


Is there any possibility to debug a Website remotely, which is open on an LG TVs Browser? I found some solutions to debug my own WebOS App with Visual Studio Code, but i want to debug the WebOS internal Browser.

The Reason for this is, that there is a website which has issues only when dsiplaying it on the LG internalal Webbrowser.

I also tried it with the "ares-inspect" command from the WebOS CLI, but i think its only possible to debug your own App with the known AppID.

I hope someone can help me out here ...

Edit 1:

In the meantime i figured out the AppID of the Internal Browser and tried to connect via ares to it:

    ares-inspect -a com.webos.app.browser -d tv
Session#forward() failed forwarding client localPort: 0 (inCnx.remotePort: 65530 )=> devicePort: 9998
ares-inspect WARN Session#forward() failed forwarding client localPort: 0 => devicePort: 9998
Session#forward() failed forwarding client localPort: 0 (inCnx.remotePort: 65531 )=> devicePort: 9998
ares-inspect WARN Session#forward() failed forwarding client localPort: 0 => devicePort: 9998
Application Debugging - http://localhost:49576

When i open the URL (http://localhost:49576) in (for my WebOS version corresponding) Chromium Browser i only get this Screen:

Screenshot of browser


Solution

  • What I suggest is building a hosted web app as is described here: https://webostv.developer.lge.com/develop/getting-started/web-app-types

    Because a hosted app uses the same browser engine as the regular browser on WebOS. But you will have the benefit of making debugging easy.

    You get use this example project to get started quickly: https://github.com/webOS-TV-app-samples/HostedWebApp

    Replace the URL within index.html with the URL from your own project. If you use a locally run dev server, insert the ip address of your computer. eg. http://192.168.1.2:8080.

    Install it on your WebOS tv, run it and then execute ares-inspect -a com.sample.hosted -d tv from your computer to start the inspector

    Now you should be able to read the console messages