Web applications running under Crosswalk can be debugged remotely using the Chrome dev tools.
To debug Crosswalk applications on Tizen, the Crosswalk service on the target must be configured to provide a debugging endpoint. You can then access this endpoint from a Chrome browser on the host.
Before you can follow these instructions, you will first need a Tizen target with Crosswalk installed, an application installed on that target via pkgcmd.
Once you have the pre-requisites in place, turn on debugging for the Crosswalk service on the Tizen target as follows:
- From the host, log on to the Tizen target. For example, if the Tizen target has the IP address 192.168.0.19:
$ ssh email@example.com Password: Welcome to Tizen root:~>
Note: the default password is tizen (for images built with GBS) or root (for images build using Yocto/OE)
- On the target, add a --remote-debugging-port=9222 option to the ExecStart=' line in the Crosswalk service configuration file, /usr/lib/systemd/user/xwalk.service. Open the file for editing:
root:~> vi /usr/lib/systemd/user/xwalk.service
- Then edit the `ExecStart=` line so it looks like this:
ExecStart=/usr/lib/xwalk/xwalk --remote-debugging-port=9222 \ --external-extensions-path=/usr/lib/tizen-extensions-crosswalk
- Reboot the Tizen target device.
Once the Crosswalk service is enabled for debugging, debug your applications as follows:
- Launch a Crosswalk application on the Tizen target using a console.
- Back on the host, open a Chrome browser and open the address http://<Tizen target IP>:9222. For example, for the IP address 192.168.0.19, the URL to use would be "http://192.168.0.19:9222".
- A list of all the pages available for debugging should now be displayed in the Chrome browser window. Click on the link for the application you want to debug.