Enabling Web Inspector
- To inspect the content of BlackBerry WebWorks applications, you must enable Web Inspector for each application individually. In a BlackBerry WebWorks application, you enable the Web Inspector by specifying a command line flag when you package your app.
- To use Web Inspector in conjunction with the BlackBerry Browser, you must first enable it in the BlackBerry Browser options. Enabling Web Inspector in the browser options only allows you to inspect content that is displayed in the BlackBerry Browser.
Once Web Inspector is enabled, the browser or application displays the IP address and port number it will use to serve the content.
Enable Web Inspector for a BlackBerry WebWorks app
You can use Web Inspector to inspect web content displayed in a BlackBerry WebWorks app. In a BlackBerry WebWorks app, you enable Web Inspector when you package the app.
To enable Web Inspector, you use the -d option flag when you package your application file.
Note: Web Inspector should only be enabled during the testing phase of development. When the application is ready for release (that is, when you are signing it for distribution), you should repackage the application without Web Inspector enabled. (involving code signing). Leaving the debugging port open may allow unintentional access to your application.
- Run the BlackBerry WebWorks Packager from a command prompt.
- At the command prompt, change to the installation folder for the BlackBerry WebWorks Packager.
- In the command
to compile the application, include the -d
option flag to enable Web
Inspector. For example:
bbwp "C:\myapp\myarchive.zip" -d -o "C:\myapp\output"
bbwp C:\myapp\myarchive.zip -d -o C:\myapp\output
Mac OS example:
./bbwp ~/myapp/myarchive.zip -d -o ~/myapp/output
When you load a Web Inspector enabled BlackBerry WebWorks application on a BlackBerry device or simulator and run it, a dialog appears that provides the IP address and the port number required to connect from your desktop browser.
Enabling Web Inspector for the BlackBerry Browser
- On a BlackBerry 10 device or on the BlackBerry 10 Device Simulator, open the BlackBerry Browser.
- In the browser, tap > Settings > Developer Tools.
- Set the Web Inspector switch to On. The browser displays the IP address and the port number required to connect from your desktop browser.
- If prompted, type your device password to complete the enabling process.
- Click the Back button at the bottom of the display to save the new settings and return to the browser window.
You can now open a connection to the BlackBerry Browser to remotely inspect the page that it is displaying.
Last modified: 2014-05-14