|
MIDP Reference Implementation provides Java™ platform source-level debugging through the CLDC debugging architecture. See your CLDC documentation for a thorough description of the debugging architecture.
This chapter briefly describes the steps that you would take to use the architecture and report any problems. It contains the sections:
Before you can debug a MIDlet, you must have versions of the MIDP executable and the MIDlet that have debugging symbols in their class files. To see whether you have an acceptable version of the midp executable, run the midp command with the -help option. If the executable has Java programming language debugging capabilities, you will see the -debugger option listed. For example:
C:\midp2.0fcs> bin\midp -help Usage: midp [<options>] Run the Graphical MIDlet Suite Manager. ... or midp [<options>] -debugger ...
If the version of the midp executable that you are using does not support Java programming language debugging, see Porting MIDP for instructions on building one.
To create a version of the MIDlet that contains debugging symbols, use the -g option to the javac command. See your Java platform documentation for more information.
To debug a MIDlet:
For example, if the MIDP Reference Implementation were installed in the directory c:\midp2.0fcs you could run the command:
Use the midp command with the switches -debugger and -port. The port number should be 2800, the port number on which the KVM debug proxy expects the debugger to be running. See the KVM documentation for more information on the debug proxy, and Using MIDP for more information on using the MIDP Reference Implementation executable.
For example:
See the KVM documentation for information on correct syntax, arguments, and options. For example, the following command has the KVM debug proxy connect to the midp executable that you started in the previous step and then listen at port 5000 for software compliant with the Java™ Platform Debugger Architecture:
c:\midp2.0fcs\> java -jar c:/kvm/bin/kdp.jar kdp.KVMDebugProxy -l 5000 -p -r localhost 2800 -cp pathsIncludingMIDletClassFiles
Compliant debuggers include jdb, Sun™ ONE Studio (formerly known as Forte™ for Java), JBuilder, Code Warrior, Visual Cafe, and others. See your debugger’s documentation for information on attaching to a running VM on the localhost at port 5000.
Send any comments, questions or general feedback to midp-comments@sun.com. If you think you have found a bug, first check the bug parade to see whether the problem has already been reported. The bug parade is at this URL:
http://developer.java.sun.com/developer/bugParade/index.jshtml
The category for this product is Mobile Information Device Profile (MIDP) Reference Implementation.
If no one else has reported the bug, report it so that it can be reproduced, analyzed, and fixed. To do this, gather the following information:
Enter the information in a bug report at this URL:
http://java.sun.com/cgi-bin/bugreport.cgi/
|
Creating MIDlet Suites MIDP Reference Implementation, Version 2.0 FCS |
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.