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: 22
Registered: ‎12-01-2009
My Device: Not Specified

How debug normal midlet eclipse project with BlackBerry emulator/devices

Hi,

 

I have this environment:

 

  Vista
  eclipse 3.5.1
  MTJ 1.0.1
  Java_ME_platform_SDK_3.0

  BlackBerry Java Plug-in    1.1.1.200911020017-11

     from http://www.blackberry.com/go/eclipseUpdate/3.5/java

 

The BlackBerry plugin runs fine if I create a *new* BlackBerry project and I can also debug it on the BlackBerry simulator.

 

But how can I debug on a BlackBerry emulator (or on real USB connected device)

my existing JAD/JAR Midlet?

(an  existing crossplatform project running fine on Nokia and Sony Ericsson)?

 

There is no menu item where I could choose to configure the BlackBerry plugin,

and in the Debug configuration I can't choose my Midlet project for BlackBerry debugging.

 

 

Thank you

Marcel

 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How debug normal midlet eclipse project with BlackBerry emulator/devices

I dn't have any working expereince on Eclipse, but you can debug using JDE.

 

In JDE select Debug -> Attach to -> Handheld -> Device PIN. If the debugger attaches properly, you can see the results on output window of JDE.

 

You can also use ALT+LGLG to view the Event Logs on device.

 

Give a look at the other Tools/feature avaialble on JDE.


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 22
Registered: ‎12-01-2009
My Device: Not Specified

Re: How debug normal midlet eclipse project with BlackBerry emulator/devices

Thank you for this hint.

 

But it is not a real solution, I need to transfer the jad/jar complicated to the device before I can debug the open issues.

 

Is it somehow possible to copy some BlackBerry config files to my jad/jar MTJ Midlet project and

suddenly, just as magic, can debug into the BlackBerry simulators?

 

And finally, click on the debug on device button of eclipse and the jad/jar are deployed via USB on to the real device

and I can debug there - seamlessly?

 

Currently I'm stuck with the remaining tow/three BlackBerry specific issues of my Midlet (which is running fine on Nokia and SonyEricsson).

 

regards

Marcel

Developer
Posts: 22
Registered: ‎12-01-2009
My Device: Not Specified

Re: How debug normal midlet eclipse project with BlackBerry emulator/devices

Hi again,

 

I can now debug my Midlet with eclipse 3.5.1 and eclipse BB plugin 1.1.1.

 

It is not very harmonic to do so:

 

* Jars and dependend projects don't work, so I have copied the complete involved source code

  from e.g. kxml2-min and my own J2ME basic libraries into the Midlet project I want to debug

  -> Not very smart, but it works

 

* I've created a dummy BlackBerry HelloWorld project and copied/merged the .classpath, .project and

  BlackBerry_App_Descriptor.xml into the root directory of my Midlet project

 

* Now I can debug in the BlackBerry Emulator.

  Unfortunately I always need to restart the emulator for each code change which takes some time ...

 

* Trying to debug the Midlet via USB on my BlackBerry 8800 4.5 failed with timeout.

  The BlackBerry shows forever "Debugger attaching..."

 

I hope this helps others for the first step,

any ideas about the remainign issues are welcome,

 

Marcel