开发者

Blackberry: Efficient debugging on device?

I am currently trying to debug a blackberry application on a real device. I find the setup time to be ludicrous! Here is my workflow:

  1. Uninstall the application using Blackberry Desktop Manager (BBDM)
    • it takes about one minute to select the options to uninstall the app...
      • BBDM needs to connect to the device and load the application list
      • you need to find and uncheck the application
    • BBDM takes about 30 seconds to uninstall 开发者_如何学Cthe application and its submodules
    • the blackberry bold 9700 now spends 2 minutes rebooting...
  2. Use eclipse to start debugging
    • eclipse installs the app
    • wait for the debugger to attach itself to the device
    • Start the app manually

All in all, a single debugging run can take more than 10 minutes to execute. If I miss a breakpoint, I have to start all over again.

Is there a way to optimize this workflow to make debugging on a blackberry device more efficient ?


You don't need to uninstall the application. When you redeploy, it will simply replace the previous version with the new one. Unfortunately it won't avoid the reboot - that's something you'll just have to live with. The good news is that reboot times are getting better on newer devices - it only takes about a minute for my Torch 9800 to fully boot up.

One can only hope that RIM will bring the "hot swap" capability of the simulators into the actual devices.


If you do not use Peristance and the application is not running, you can remove it and then reload it without a reboot.

Furthermore, rather than using the application manager you can use the javaloader.exe file that comes with the eclipse sdk, its located in the bin dir of the sdk to remover or load the cods

Example .bat file

cd C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator


java -jar "C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\bin\SignatureTool.jar" -a -c -p myPassword *.cod 

"C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\bin\javaloader" -u load  myCodFiles.cod

Also personally I debug with the JDE because it is much less laggy then eclipse, but that is a personal choice.


There is some trick to make debugging more efficient in eclipse.

1.You must create fake empty project.

2.And start debugging for it instead of your real project.

3.When debugger has attached, you can run real application on device and debug it without rebooting.


I am using Debug as-> Blackberry Device to debug the application on my Blackberry Torch 9800. It is doing OK most of the times although I admit that debugging in blackberry is not as fast as in iPhone(much faster) or Android(just fine).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜