Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Posts: 83
Registered: ‎05-24-2011
My Device: Storm 9550
My Carrier: XXX

Not sure how to debug on device...

Here is my problem: I am trying to load an app I have written on a device. The app works fine on the simulator, but when I load it on the device, I get a nullPointerException. I would like to debug on the device if possible, but I get errors when I try to run the app while it is connected to my computer because I am also using a SQLite database. Any suggestions?

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Not sure how to debug on device...

If you put "debug "in the Search box, you will get a number of useful KB articles including this one:

http://supportforums.blackberry.com/t5/Java-Development/How-Do-I-Debug-on-a-Live-Device/ta-p/446842

Developer
Posts: 265
Registered: ‎01-02-2011
My Device: Z30, PlayBook
My Carrier: AT&T

Re: Not sure how to debug on device...

The SD Card on my 9930 is not accessible when connected. So, after you start the debugging, you have to Disconnect the SD Card so that the application can access it.

_________________
Meetup for BlackBerry 10
Meetup Search Tool - not available at the moment
Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Not sure how to debug on device...

When you connect, the device normally puts up a prompt asking if you want to access the SD Card as mass storage, or if you are connecting for charge only.  Charge only is good enough to do debugging, which I think means your SD Card is accessible.  Or am I wrong.  Can't say I have specifically tested this, just this is how I thought it would work. 

Developer
Posts: 265
Registered: ‎01-02-2011
My Device: Z30, PlayBook
My Carrier: AT&T

Re: Not sure how to debug on device...

No, "Charge Only" does not work.  The device still uses the Desktop Manager to sync and the Debug syncs.

 

Also, it seems that if you adjust the SD Card connection before debugging, then the debugging goes haywire.

 

 

Currently, I'm having an issue that I can write the database (because it is showing a size of 5 KB when I look throught he windows explorer), but I can't read from it.  But, I won't hijack this thread with that issue.

_________________
Meetup for BlackBerry 10
Meetup Search Tool - not available at the moment
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Not sure how to debug on device...

Shut down, Desktop Manager - it is grabbing the device.

 

You can check if your debugging will work by going into the Media Application, pressing menu, and selecting Explore.  You should see the internal card (if your device has one) and the media card.  If the media explorer can see it, with the device connected, you should be able to debug.

Developer
Posts: 265
Registered: ‎01-02-2011
My Device: Z30, PlayBook
My Carrier: AT&T

Re: Not sure how to debug on device...

Yes, that did it.  My desktop manager didn't open this morning and that kept it from messing up the SD Card connection.

_________________
Meetup for BlackBerry 10
Meetup Search Tool - not available at the moment