Some months ago I pointed to a tutorial about the Antenna toolkit setup for Eclipse Antenna toolkit setup for Eclipse... Today Klaus gave me thanks and some comprehensive feedback as a comment I found worth a new entry:
That tutorial about the antenna setup was very helpful. And debugging with eclipse 2.1.1 windows works fine if you allow the debugged VM to exit. Otherwise, mine just crashed the moment when eclipse attached.
1. for wtkrun use debug="3452" or some other port you like
2. make a debugger config for remote debugging
3. enable "Allow termination of remote VM"
4. specify the same port in debugger config
5. just leave the host name blank
6. never start the debugger before the emulator
Step 6 is important, otherwise you make your eclipse hang up on you and block. Wait for the emulator to get ready (it won't start execution though) and then connect from eclipse. Interestingly enough, it seems to be ready when it prints "VM not ready".
If the emulator complains about address already in use, move on to a different port. Be sure to change the port both in wtkrun and debug config. Sometimes it seems that a locked debugger or crashed emulator wastes a port. Maybe something with windows. Just move on to another. Or reboot…
Once the connection is up it works like a charm, source level debugging and local variables are as you expect them to be.
Comments
Antenna - Eclipse J2ME development experiences
Patrick,
thanks for that feedback - I was not aware of this fact and I will look into this in the next days...
christoph