0N/A <
TITLE>Release notes for the javadt debugger</
TITLE>
0N/A<
BODY BGCOLOR="#FFFFFF">
0N/A<
H1>Release notes for the javadt debugger</
H1>
0N/AAs a demonstration of the
0N/AJava<
sup><
font size=-
2>TM</
font></
sup> Platform Debugger Architecture</
A>
0N/Awe are providing source code for
0N/Aa simple GUI debugging tool - <
b>javadt</
b>.
0N/AIt is included as an example and demonstration of
0N/AJDI</
A>. It is not a finished or polished debugger and is
0N/Amissing many features of importance for real debugging work.
0N/A<
H2>Invoking javadt</
H2>
0N/A<
b>javadt</
b> can be run by executing:
0N/Awhere <class-name> is the name you would normally
0N/Aplace on the <
code>java</
code> command line.
0N/ANote: the path to the <
A HREF="index.html#SETUP">JDI Library</
A> and to
0N/Athe compiled <
b>javadt</
b> class files must be on the class path
0N/AFor example, you can invoke the javadt debugger as follows:
0N/ANote: this <
code>-classpath</
code> option controls the
0N/Aclass path for the <
code>Hello</
code> application.
0N/AOnce the window appears, you can issue the 'run' command to begin
0N/Aexecution immediately. It is also
0N/Apossible to give the class name in the 'run' command, in
0N/Awhich case it may be omitted when invoking the debugger from the
0N/AThe classpath may also be set from within the debugger, using the
0N/A'classpath' command. Currently, other arguments to the VM must be
0N/Agiven on the shell command line when the debugger is initially
0N/Ainvoked. The most recently mentioned classpath, VM arguments, main
0N/Aclass name, and program arguments are retained as defaults for later
0N/A'run' and 'load' commands. (Unfortunately, at present, the debugger
0N/Awill likely crash if you attempt to begin another debugging session
0N/Awith another debuggee process from within the same invocation of the
0N/Adebugger. You should exit to the shell and start a new debugger
0N/A<
H2>Using javadt</
H2>
0N/AThe javadt normally displays context related to the "current thread",
0N/Athat is, the thread that most recently encountered a breakpoint, threw
0N/Aan uncaught exception, or was single-stepped by the user. When
0N/Aprogram execution is suspended on account of one of these events, a
0N/Acurrent thread exists, and the javadt displays the following information
0N/A<
LI> A stack backtrace.
0N/A<
LI> The source code surrounding the line corresponding to the
0N/A instruction counter for the thread, if the source code is
0N/AIn addition, a tabbed pane allows the user to view one of three
0N/A<
LI> A tree of all source files available on the source path.
0N/A<
LI> A tree of all loaded class files, organized hierarchically
0N/A<
LI> A tree of all active threads, organized hierarchically
0N/ABy clicking on the name of a source file, the source view can be
0N/Adirected to display it. Likewise, clicking on a thread will make that
0N/Athread the current thread. These features are normally used while the
0N/Aprogram is suspended,
e.g, at a breakpoint. Upon resumption and
0N/Aencountering another breakpoint, for example, the current thread will
0N/Abe automatically reset and the views will be updated. The views tile
0N/Athe javadt display, and are adjustable in size.
0N/AThe javadt functionality is rather basic, thus a command-line interaction
0N/Awindow is also provided that allows access to functions that are not
0N/Ayet exposed in the javadt. In particular, it is necessary to use the
0N/Acommand line in order to set breakpoints and examine variables. The
0N/Ajavadt debugger command interpreter implements roughly a subset of the
0N/A functionality, but adds a few commands of its own. The
0N/A'help' command lists the complete set of commands and their function.
0N/AShortcuts for a set of the most common commands is provided on a
0N/Abutton-bar at the top of the display.
0N/AThe program to be debugged may be started either as a child of the
0N/Adebugger, or the debugger can be attached to an existing process,
0N/Aprovided that its VM is prepared to accept the connection. If the
0N/Adebuggee is started by the debugger as a child, a line-oriented
0N/Ainterface to its standard input, output, and error streams is provided
0N/Ain an application interaction pane.
0N/AThe debugger expects to find the program source code on its
0N/Asourcepath, set with the 'use' or 'sourcepath' command. If you find
0N/Athat sources are not being displayed because the sourcepath is
0N/Aincorrect, you may change it at that time, and the source view will be
0N/AThe message "No current thread" is often encountered when stepping
0N/Athrough a program. This message does not mean that the thread or
0N/Athe VM has died, merely that a current thread is undefined. This
0N/Asituation can easily occur unexpectedly when the program being
0N/Astepped is waiting, eg., for input. The VM appears to be stopped,
0N/Aas it would be after the successful completion of a step, but it
0N/Ais considered to be "running", not "interrupted". The prompt
0N/Ain the command interaction pane indicates the state by changing
0N/Ato a thread name and frame number when the VM is interrupted.
0N/AWhen it is running, the prompt "Command:" is displayed.
0N/A<
H2>Source for javadt</
H2>
0N/AFull source code for <
b>javadt</
b> is included under the
0N/ANote: these directories also include the
0N/ASource code for these example applications is included to provide concrete
0N/Aexamples for debugger developers. Example code may be used, modified
0N/Aand redistributed by debugger developers providing they adhere to the
0N/Aterms in the COPYRIGHT notice.
0N/A<
b>javadt</
b> uses the following packages (found under the
0N/A<
code>debug</
code> directory):
0N/A<
DD>User interface code
0N/A<
DD>Debugger core code
0N/A<
DT><
code>events</
code>
0N/A<
DT><
code>expr</
code>
0N/A<
DD>Expression processing code
0N/A<
H2>Building javadt</
H2>
0N/ATo build the <
b>javadt</
b> classes from the
0N/Aprovided source files under the <
code>debug</
code> directory,
0N/Ayou need only to compile them. No special
0N/Aoptions are required, aside from those which set your classpath to
0N/AHowever, if you want to modify the expression parser in the file
0N/AJavaCC parser generator</
a>.
0N/AIt is available free from
0N/A(now part of WebGain)</
a>.
0N/A <
address><
a href="mailto:java-debugger@java.sun.com">java-debugger@java.sun.com</
a></
address>