简体   繁体   English

黑莓:在设备上进行高效的调试?

[英]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) 使用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 BBDM需要连接到设备并加载应用程序列表
      • you need to find and uncheck the application 你需要找到并取消选中该应用程序
    • BBDM takes about 30 seconds to uninstall the application and its submodules 卸载应用程序及其子模块需要大约30秒的时间
    • the blackberry bold 9700 now spends 2 minutes rebooting... 黑莓大胆9700现在花费2分钟重启...
  2. Use eclipse to start debugging 使用eclipse开始调试
    • eclipse installs the app eclipse安装应用程序
    • 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. 总而言之,单个调试运行可能需要10分钟以上才能执行。 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. 好消息是新设备的重启时间越来越好 - 我的Torch 9800完全启动只需要一分钟左右。

One can only hope that RIM will bring the "hot swap" capability of the simulators into the actual devices. 人们只能希望RIM能够将模拟器的“热插拔”功能带入实际设备中。

If you do not use Peristance and the application is not running, you can remove it and then reload it without a reboot. 如果您不使用Peristance且应用程序未运行,则可以将其删除,然后重新加载而无需重新启动。

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 此外,您可以使用eclipse sdk附带的javaloader.exe文件,而不是使用应用程序管理器,它位于sdk的bin目录中以移除或加载鳕鱼

Example .bat file 示例.bat文件

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. 另外我个人用JDE进行调试,因为它比eclipse慢得多,但这是个人选择。

There is some trick to make debugging more efficient in eclipse. 有一些技巧可以使eclipse中的调试更有效。

1.You must create fake empty project. 你必须创造假的空项目。

2.And start debugging for it instead of your real project. 2.并开始调试它而不是你的真实项目。

3.When debugger has attached, you can run real application on device and debug it without rebooting. 3.调试器连接后,您可以在设备上运行实际应用程序并在不重新启动的情况下进行调试。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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