With the recent launch of the BlackBerry® PlayBook™ tablet, there has been a lot of excitement and activity around developing Web content for the platform as well as using the BlackBerry® WebWorks™ SDK to produce fully-featured standalone BlackBerry® applications.
I wanted to share details about some of the available debugging and profiling tools that you can use to improve the quality of your content by troubleshooting bugs, tuning changes, and optimizing performance.
Web Inspector for the BlackBerry Tablet OS
The Web Inspector tool is a debugging and profiling development tool for web content that is included as part of the WebKit rendering engine. It is widely considered one of the most comprehensive and powerful utilities that web developers can use to troubleshoot and optimize their web content. It includes a variety of features and capabilities, such as inspection, profiling, console integration and more.
A common challenge that mobile web developers have historically experienced is that the Web Inspector tool is easily accessible for use with content loaded directly within WebKit-powered desktop browsers (such as Google® Chrome or Safari), but not necessarily for content loaded on a mobile device. I’m very happy to share that you can now use the Web Inspector tool to debug and profile live web content and/or BlackBerry WebWorks applications running on a BlackBerry PlayBook tablet or simulator. In fact, the Web Inspector tool for PlayBook is one of the only detailed ways to see inside a live mobile browser.
How do I enable the Web Inspector tool for content loaded in the BlackBerry Tablet OS browser?
- Select the “Privacy & Security” tab from the “browser options” screen on your BlackBerry PlayBook tablet.
- Switch the “Enable Web Inspector” to On.
- When prompted, enter your BlackBerry PlayBook tablet device password.
How do I enable the Web Inspector tool for a BlackBerry WebWorks application?
- Use the –d command line operator when using the bbwp.exe utility to build your application.
bbwp.exe c:\sandbox\myApp\myApp.zip –d
Tip: You can enable the Web Inspector flag while building a signed version of your application; however, it is not recommended. By using both of these command line arguments together, it may allow remote access to the production version of your application.
How do I use the Web Inspector tool to load live content from the BlackBerry Tablet OS?
- Open a desktop web browser such as Chrome, Firefox, Safari or Internet Explorer.
- In the address bar, enter the IP address of the target BlackBerry PlayBook tablet and port 1337 (e.g. http://126.96.36.199:1337).
- You will be prompted with a list of page titles for content that has been loaded into memory by the Web Inspector tool (such as browser content or a BlackBerry WebWorks application).
- Click on any of the page titles to begin using the Web Inspector tool to debug and profile your Web content.
What about BlackBerry Smartphones?
Beginning with BlackBerry 7 handheld software, all handheld software going forward will have support for Web Inspector.
There is also a variety of alternative debugging options available for you to choose from that can assist in the troubleshooting and tuning of application content running on existing BlackBerry smartphone device software.
Additional debugging options
Some additional utilities that can be used to debug and profile web or BlackBerry WebWorks content running on BlackBerry Device Software version 5.0 and BlackBerry® 6:
- Chrome Developer Tools (aka Web Inspector) Guide
- Measure Web Load Times with WebKit Inspector (YouTube video)
- BlackBerry WebWorks SDK for Tablet OS
- BlackBerry WebWorks SDK for Smartphones
- BlackBerry Browser manuals