Enabling Web Inspector

By default, Web Inspector functionality is disabled. How you enable Web Inspector depends on whether you are inspecting content in a BlackBerry WebWorks app or in the BlackBerry Browser:
  • 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.

  1. Run the BlackBerry WebWorks Packager from a command prompt.
  2. At the command prompt, change to the installation folder for the BlackBerry WebWorks Packager.
  3. 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"

    Windows example:

    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

  1. On a BlackBerry 10 device or on the BlackBerry 10 Device Simulator, open the BlackBerry Browser.
  2. In the browser, tap action menu icon > Settings > Developer Tools.
  3. Set the Web Inspector switch to On. The browser displays the IP address and the port number required to connect from your desktop browser.
  4. If prompted, type your device password to complete the enabling process.
  5. 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



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus