简体   繁体   English

如何设置我的环境以在Blackberry设备上进行调试?

[英]How do I set up my environment to debug on a Blackberry device?

I'm sorry if I'm asking the wrong thing in stackoverflow, but I've come to my wits end dealing with Blackberry. 如果我在stackoverflow中问错了,我很抱歉,但是我最终会遇到黑莓手机。 Documentation, site organization, general levels of support have all come together to the point that I haven't been able to do a whole lot of actual work in this environment. 文档,站点组织,一般支持级别都汇集到了我在这种环境中无法完成大量实际工作的程度。

I currently have the Eclipse environment downloaded from the blackberry developer's area website. 我目前从黑莓开发者的区域网站下载了Eclipse环境。 I can run the simulator and everything else without issue. 我可以运行模拟器和其他所有问题。 What I'm trying to do now is to move from debugging on the simulator to debugging on the device itself. 我现在要做的是从模拟器上的调试转到设备本身的调试。 This is an important step for me, but I haven't found a satisfactory way to do it... 这对我来说是重要的一步,但我没有找到一个令人满意的方法来做到这一点......

What I've found are some posts saying that I should package an ALX (of which I'm still not sure on how to do), and using the BDM to install it. 我发现的是一些帖子说我应该打包一个ALX(其中我仍然不确定如何做),并使用BDM来安装它。 This, however, means I won't be able to use the debugger... 但是,这意味着我将无法使用调试器......

If someone could direct me to a resource that will give me step by step instructions from coding to release of blackberry development, this would be awfully helpful. 如果有人可以指导我一个资源,它将从编码到发布黑莓开发的一步一步的指示,这将是非常有帮助的。

Thanks so much! 非常感谢!

Yes, please test your code on a device. 是的,请在设备上测试您的代码。 Basic stuff works the same between both, but especially when you get into networking, media, etc. the devices are different. 基本的东西在两者之间的作用是相同的,但尤其是当你进入网络,媒体等时,设备是不同的。

You can debug on your device through Eclipse. 可以通过Eclipse在您的设备上进行调试。 I can't provide you with an end-to-end guide on SO, but here's the quick debug guide. 我无法为您提供有关SO的端到端指南,但这里是快速调试指南。

  1. Build (sign if necessary) and load your app onto the device. 构建(必要时签名)并将您的应用程序加载到设备上。 You can do this with the desktop manager, or with the command-line javaloader tool that comes with the JDE (look in the bin directory), or even OTA (over the air) 您可以使用桌面管理器,或使用JDE附带的命令行javaloader工具(查看bin目录),甚至是OTA(无线)
  2. After loading, make sure the Desktop Manager is NOT running (it'll interfere with on-device debugging) 加载后,确保桌面管理器未运行(它会干扰设备上的调试)
  3. From Eclipse, create a new debug configuration, in the Debug Configurations dialog click on BlackBerry Device, and then click on the new configuration icon. 在Eclipse中,创建新的调试配置,在Debug Configurations对话框中单击BlackBerry Device,然后单击新配置图标。 Default settings should be fine. 默认设置应该没问题。
  4. Make sure your device is plugged into your USB port and start your new debug configuration. 确保您的设备已插入USB端口并启动新的调试配置。 You'll probably get a lot of prompts about things missing (because actual devices don't have debug info for any built-in stuff, generally) but click through those and you should be fine to debug. 你可能会得到很多关于缺少的东西的提示(因为实际的设备通常没有任何内置东西的调试信息)但是点击这些就可以调试了。

This is something we struggled with a lot at my old company. 这是我们在旧公司中经常遇到的事情。 I don't think it's possible to do with Eclipse, you have to use the BB JDE, creating the necessary project files against the same code base. 我不认为可以使用Eclipse,你必须使用BB JDE,针对相同的代码库创建必要的项目文件。 I could be wrong on that one as we weren't using the RIM Eclipse plugin, just building it all with Ant. 我可能错了,因为我们没有使用RIM Eclipse插件,只是使用Ant构建它。

Personally I never managed to get passed "debugger attaching..." on the device, although I believe a colleague got it to connect but found it too slow to be usable (if you think how slow the emulator can be sometimes...). 就个人而言,我从来没有设法在设备上通过“调试器附加...”,虽然我相信一位同事得到了连接,但发现它太慢而无法使用(如果你认为模拟器有时会有多慢......) 。 I know our ant build file had a target for building a version specifically for the JDE profiler, although that was only against the emulator. 我知道我们的ant构建文件有一个专门为JDE探查器构建版本的目标,尽管那只是针对模拟器的。

In the end we resorted to using our own function debugging code that manually logged entries, exits, parameters and run times, sending the result to a special server. 最后,我们使用自己的函数调试代码,手动记录条目,出口,参数和运行时间,将结果发送到特殊服务器。

Sorry if that doesn't help much, but that was our experience. 对不起,如果这没有多大帮助,但这是我们的经验。

Never needed to debug on the device itself, I've always found that the apps i've written work on the device, same as on the handset. 从来不需要在设备上进行调试,我总是发现我写的应用程序在设备上工作,就像在手机上一样。

As for generating an ALX, in eclipse right click on the project inside the Package Explorer and select "Generate ALX File". 至于生成ALX,在eclipse中右键单击Package Explorer中的项目并选择“Generate ALX File”。

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

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