I’ve spent a bit of time today figuring out how to debug my app on an actual Blackberry device rather than the simulator.
No, it’s not just a matter of just selecting Run As -> Device. Yes, it should be. Yeah, I don’t know what they were thinking either.
Main thing to note is that what RIM calls “testing” an app involves deploying an app to a phone, and “debugging” an app involves, well, debugging an app that is already on the device.
1) You need to install the BlackBerry Desktop Manager - this is how you will be deploying the app to the device.
2) Generate the ALX file for your app (right click on the project in Package Explorer in Eclipse and click “Generate ALX file”)
3) Install the app using the Desktop Manager (Application Loader, Add/Remove, browse to the ALX file, then check the checkbox next to your newly added project from the list, click Next)
4) Your app should be on the device. You can now debug it by selecting Debug As -> BlackBerry Device. You may need to create a new Debug Configuration first - see Debug a BlackBerry device application on a BlackBerry device or this vid will walk you through it)
This is one of the ways to do it. You can also get the app on your device using the javaloader (see Test a BlackBerry device application on a BlackBerry device)