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
Developer
Posts: 73
Registered: ‎10-23-2009
My Device: Not Specified
Accepted Solution

Attach Debugger to New Simulator

I can't find any resources for setting up the Eclipse debugger to point to a BB simulator that was not included with the component packs.  I need the ability to set breakpoints and see the variable values on a specific simulator that my code misbehaves on. (specifically, my app can't establish a network connection on the OS 5.0.0.604 simulator, but the code works fine on the 5.0.0 simulator that comes with the component pack)

 

I've spent 6 hours now Googling and being linked in circles around the BB forums, but I can't find anything that actually lists how to connect the debugger to another simulator.  Please help me!  :-(

 

So, if anybody has a link tucked away that they can share, I would REALLY appreciate it.

 

Thanks,

~NN

Developer
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Attach Debugger to New Simulator

You've tried starting the simulator and then within Eclipse going to Run > Debug > Running BlackBerry Simulator? (This is assuming that the code running on the simulator was also built in Eclipse.)




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Developer
Posts: 73
Registered: ‎10-23-2009
My Device: Not Specified

Re: Attach Debugger to New Simulator

Yes.  When I do that I get multiple errors about missing .debug files.  The application runs, and I see output on the console panel, but it won't stop at any of my break points.

Highlighted
Developer
Posts: 212
Registered: ‎07-18-2008
My Device: Storm 9550

Re: Attach Debugger to New Simulator

Check if the working directory is set correctly for this simulator: ("advanced" tab).

 

The .debug files will be generated when you compile the application. You could alterntativly copy them manually to the simulator next to you COD to enable your breakpoints.

If your problem was solved, please mark answer as "Accepted solution"
If your want to thank, click the "kudo" symbol
___________
visit me: http://mobilejavadevelopment.blogspot.com/
visit the Berlin BlackBerry Developer Group: http://berlinblackberrydevelopers.blogspot.com/
Developer
Posts: 73
Registered: ‎10-23-2009
My Device: Not Specified

Re: Attach Debugger to New Simulator

It worked!  I think the .debug files were out of date because I was using Build instead of Build Active Blackberry Configuration.  Thanks dpreussler!

 

Here are the exact steps I ended up following to get debugging working:

 

 

-Build Active Blackberry configuration
-Copy .cod and all .debug files (there are 16 of them) to the simulator's root directory.
-launch the simulator (my app appears in the downloads folder as expected)
-In Eclipse, click Debug->Debug As->Running Blackberry Simulator
-Watch the debugger attach to the simulator.  The console now shows messages from the simulator and the Debug pane shows the currently running threads.
-Throw a few breakpoints in the code that are guaranteed to be hit.
-Launch the application.
-IT WORKS!!!  The breakpoint was hit!!!