I'm developing MIDlet with JBuilder 9 under WindowsXP (with SP1).
JBuilder runs fine, debugging goes fine (as long as it is 'regular' java, not a MIDlet).
But debugging a MIDlet is virtually impossible. Some of the debugging goes fine. I can step over/in/out, see variable values, etc. But I keep having these problems and they make debugging very hard:
1. Showing the call-stack may cause my emulator to hang, sometimes JBuilder hangs or sometimes I can not properly close the emulator (when i close JBuilder, it says the MIDlet is still running, although no processes are shown in the windows' Task Manager...)
2. Setting break-points will cause the midlet to stop at these break-points, but there is no visual feedback. I can't see where the current execution line is. Also, the call-stack (if working properly) shows me either i'm in the function 'obsolete()' (what is that!?) or inside runCustomCode() (???? I'm already in my midlet code, just calling a method). Stepping over seems to do nothing until the code is suddenly done with the method i was trying to debug and all works well again.
3. Debugging code that is executed within a paint() event handler is almost impossible. Sooner or later the debugger will hang or crash.
Has anyone else had these problems? If so, how did you solve them.
Using the Series_60_MIDP_Concept_SDK_Beta_0_3_Nokia_edition device goes really well. Debugging is fast and works well.
Using Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1 device works well too, but is very sluggish. Each step-over takes about 5 seconds (sometimes longer). When starting the batch file with this device, you'd better remotely attach the BugSeeker fast, otherwise your desktop may get VEEERRRRYYY slow (i had to do a hard reset of my computer at some point). It does not behave well when a remote debugger is not attached (yet).
After the emulator is running, attach the BugSeeker's debugger to port 3044. Wait a little and then hit the 'Continue' button.
Again, Thanks Rab_UK!
PS: I use "cmd /k" because i'd like to view the console output later.
BTW: It works (much) better with JBuilder as well, as long as you start the emulator outside of JBuilder and debug remotely.