views:

541

answers:

3

I'm sorry if I'm asking the wrong thing in stackoverflow, but I've come to my wits end dealing with Blackberry. 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. 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. 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!

A: 

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. I could be wrong on that one as we weren't using the RIM Eclipse plugin, just building it all with 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.

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.

roryf
Hi, I appreciate any help at this point. Free support is so dodgy, and paid support is $75/hour, where they pay someone to search the blackberry forums for you. Once, they even referred me to my OWN POST!
Sam
That doesn't surprise me in the slightest... :(
roryf
A: 

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

Fermin
Ah, see, this isn't an issue of just using standard network connections. My application is lower level than that, and involves the A/D on the device itself. This can change depending on the device, as Apple's iPhone has proven to us with their Headset connector.
Sam
+2  A: 

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. I can't provide you with an end-to-end guide on SO, but here's the quick debug guide.

  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)
  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. Default settings should be fine.
  4. Make sure your device is plugged into your USB port and start your new debug configuration. 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.
Anthony Rizk