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 devices running BlackBerry 7 or 7.1, Web Inspector will not work if device encryption is enabled. To disable device encryption, open the device Options and click Security > Encryption.
- On a BlackBerry smartphone or on the BlackBerry Smartphone Simulator, open the BlackBerry Browser.
- In the browser, open the browser menu and click Options.
- In the Web Content portion of the screen, check Enable Developer Tools. Enabling the developer tools causes the Developer Tools menu item to be displayed in the browser menu.
- Save the change and exit the Options screen.
- Open the browser menu, and select Developer Tools > Enable Web Inspector. The browser displays a dialog box that indicates that Web Inspector is now enabled, and provides the IP address and the port number required to connect from your desktop browser.
You can now open a connection to the BlackBerry Browser to remotely inspect the page that it is displaying.
Last modified: 2013-08-14