debugging for LG Part 1

LG has since deprecated their WebOS IDE - Debugging on LG Part 2 contains the most up to date info for debugging

 
 

set up

Debugging for LG is actually very easy. We are assuming that you already have the webOS TV CLI and webOS TV IDE apps setup, that the app you want to test is installed on the LG TV, and that the LG is currently in dev mode. You will also need the Chromium browser installed for this. There are also 2 ways you can debug: via the IDE or via the CLI.

Make sure your LG and PC are on the same network.

Launch your LG app in test.


WEBOS IDE

In the Target Configuration section (bottom right corner) of the webOS IDE app, right click on the device you’re testing on.

Click on Connect.

Once the installed and running apps appear below the device, right click on the app name.

Select Debug.

Chromium will open with a debugger now. If we click on the network tab, the traffic will start to appear for the app.

You can save the traffic by right clicking anywhere and then selecting Save all as HAR with content. Rename the file something appropriate and put .har at the end. Click Save.

You can open this log in Charles afterwards.


web OS CLI

Open the CLI app on your PC.

Type “ares-setup-device —list” to make sure your TV is set to default (otherwise you may have issues).

Type ares-inspect (name of app package that we see in the IDE).

At this point, if the application was not open it will be launched and a link will appear in the CLI.

Copy this link.

Open your web browser and copy paste that link into the address bar.

Click on the link that appears in the browser.

Now we can see the network traffic.

If we right click anywhere in the calls we can Copy All as .HAR.

Open the notepad app on your PC and paste that copied info into it.

Click Save As and then save the file as a .HAR file.