views:

35

answers:

3

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 ?

+2  A: 

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.

Marc Novakowski
Thanks for the answer. However, on my 9700, if I start a debugging session when the application is already installed, it will reboot the phone, and the debugging session will timeout before the phone is rebooted. This is why I currently uninstall the app beforehand.
pbreault
I've found that my devices don't do the automatic restart if existing classes weren't structurally changed - meaning the class hierarchy is the same, and all the fields have the same name and type as the last instance of the app installed on the phone. Pretty strict, but you can still change the code quite a bit.
Michael Donohue
+1  A: 

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.

haagmm
A: 

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.

folkyatina