Debugging Web App
Version added 07-Mar-2018| Modified 12-Apr-2018
Web Inspector is based on Google Chrome Developer Tools. Refer to Google Developers for the detailed description of how to use Google Chrome Developer Tools. Some versions of Google Chrome may not support Web Inspector.
Launching the Web Inspector
To launch the Web Inspector on a webOS OSE device , you must execute the ares-inspect command while the web app is running. For detailed information on the command, see Command Line Interface.
ares-inspect --device TARGET_DEVICE --app APP_ID --open
This loads the Web Inspector in your default browser as shown in the following screenshot:
Testing a Local Web App
The ares-server command can run a web server based on a given app directory. A web browser has some restrictions related to security policy, on accessing local files (same-origin policy). For this reason, this command provides a simple web server to bypass the security policy of browsers. For detailed information on the command, see Command Line Interface.
To start the web server on your app directory, execute the following command:
ares-server ./sampleApp Local server running on http://localhost:7496
This command starts the web server and gives an URL using which you can open the app. Alternately, if you want the command to directly open the URL on the default browser, execute the following command:
ares-server ./sampleApp --open
To terminate the web server, use Control-C (in Windows, Linux) or Command-C (in Mac OS) on prompt.