The beta 5 release of JDE-2.1.6 is available once again for downloading at
http:/sunsite.auc.dk/jde/
This release contains an early release of JDEbug, the new debugger
being developed especially for the JDE. See the release notes below
for details.
- Paul
JDE2.1.6beta5 Release Notes
This beta contains an early release of JDEBug, the new
debugger being developed for the JDE by Paul Kinnucan and
Amit Kumar, with the support of Sun Microsystems. The new
debugger is based on Sun's Java Platform Debug Architecture
and is designed specifically to work with Emacs, which
serves as its user interface. The new release requires
a JDK 1.2-compatible vm.
To debug a project with JDEbug, you must first select
it as the debugger for the project. You do this by customizing the
variable jde-db-debugger. To customize this variable,
select Options->Save Project from the JDE menu to display
the project customization buffer. Then edit the jde-db-debugger
entry in the buffer to read as follows:
Jde Db Debugger: [Hide]
Name: jdebug
Debugger type is
( ) Executable
(*) Class
[State]: you have set this option, but not saved it for future sessions.
Specify debugger. [More]
Finally, save the setting. If you want to use the debugger
only on the current project, select "Set for current session"
from the customization buffer's State menu and then select
Options->Save Project from the JDE menu to save the setting
in the project's project file. Otherwise, select
the "Save for future sessions" options to save the setting
in your .emacs file.
After you have saved the setting, open a Java source file
from the current project (or any source file if you save the
jde-db-debugger setting in your .emacs file). You should now
see the JDEbug menu in the Emacs menu bar. Note that most of
the menu items are grayed. Some items are grayed because they
are not yet implemented; others, because they require an
application to be running.
Before proceeding further, first check that you have set
jde-db-source-directories to specify the directories containing
source files for the application you want to debug.
Now, to debug an application, first set a breakpoint somewhere
in your application. To set the breakpoint, open the source
file for the breakpoint selection, click the line at which
you want the debugger to halt execution of the application, and
the select Set Breakpoint from the JDEbug menu. The JDE highlights
the selected line in yellow (you can customize the highlight color).
Once you have set the breakpoint, close all Emacs windows except
the one containing the source file with the breakpoints. Then, select
Debug App from the JDE menu. After a short pause, the Emacs frame
divides into three windows. The top window contains your source file.
You should see a debug arrow pointing at the breakpoint line,
indicating that the debugger has halted your application at the breakpoint.
The middle window contains a window for interacting with your
application. Application standard output appears in this window.
You can enter application input in this window also (not tested). The bottom
window shows debug output from the JDE and the debugger. You can
now use the debugger's step and continue commands to step through
your program. To abort the application and exit the debugger, select
Exit from the JDEbug menu.
As you will quickly discover, the current release is limited to setting
breakpoints and stepping through an application. Subsequent releases
will add support for displaying variables, setting watchpoints,
controlling threads, debugging multiple processes, browsing objects,
etc. Much of this functionality is already implemented in the debugger
and only needs to be exposed via the JDE interface. So new features
should come pretty quickly.
Your feedback regarding bugs and usability is welcome. We are particularly
interested in input on user interface issues, especially related to
the problem of managing multiple processes and debugger output window
configuration.