Enabling Web Inspector

How you enable Web Inspector depends on whether you are inspecting content in a BlackBerry WebWorks app or in the BlackBerry Browser:
  • In a WebWorks app, Web Inspector is enabled by default when you build your app without signing it (debug mode). You can also enable Web Inspector for signed apps (release mode) by specifying a command-line flag.
  • To use Web Inspector with the BlackBerry Browser, you must first enable it in the BlackBerry Browser options. Enabling Web Inspector in the browser options allows you to inspect only the content that is displayed in the BlackBerry Browser.

Once Web Inspector is enabled, the browser or app displays the IP address and port number it uses to serve the content.

Enable Web Inspector for a BlackBerry WebWorks app

In a BlackBerry WebWorks app, Web Inspector is enabled by default for unsinged apps. Typically, during your development cycles, you build your app without signing it so you can test it (called debug mode). You can build your app in debug mode using the SDK web tool, or from the command line, using any of the following commands: webworks build --debug, webworks run, or webworks emulate. See Building your app for testing for more information.

To enable Web Inspector in a signed app, you must build your app from the command line (using webworks build --release command), and include the --web-inspector flag in the command. See Building and signing your completed app for more information.

Note: You should enable Web Inspector for signed apps sparingly. Leaving the debugging port open may allow unintentional access to your application.

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-09-29



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

comments powered by Disqus