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 tablet or on the BlackBerry PlayBook Simulator, open the BlackBerry Browser.
  2. In the browser, swipe down from the top bezel to display the browser's menu bar.
  3. Click the Options icon to display the browser Options screen.
  4. On the browser Options screen, select Privacy & Security.
  5. On the Privacy & Security panel, slide the Enable Web Inspector setting to On.The browser displays the IP address and the port number required to connect from your desktop browser.
  6. If prompted, type your device password to complete the enabling process.
  7. Click the Back button at the top of the display to save the Options 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: 2013-08-14