简体   繁体   中英

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 the 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.

我正在使用Debug as-> Blackberry Device来调试我的Blackberry Torch 9800上的应用程序。虽然我承认黑莓手机的调试速度不如iPhone(快得多)或Android(只是很好),但大部分时间都没问题。 )。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM