edebug, why you rule
Edebug is really easy to use. The emacswiki has a description of how to use SourceLevelDebugging. The info doc has an extensive description on how to use edebug too.
I’ve been using the gud-jdb debugger for java. I’d like to see the gud-jdb behavior be more like edebug, where typing interacts with the debugger rather than modifying the source buffer.
I’ve had some problems with gud and jdb. Mainly it chokes on 1.5 syntax, import static makes parsing fail. Attaching to a remote vm, actually the easiest way to debug a complicated java application with multiple classloaders, only works when you have gud-jdb-use-classpath and gud-jdb-directories set. I typically run a quick command to get the directory containing the class I want to debug to gud-jdb-directries, like:
(add-to-list 'gud-jdb-directories (file-name-directory (buffer-file-name (current-buffer))))
I created a small function for adding a java(jde-mode) buffer to the gud-jdb-directories. This function let’s the debugger find a source file when you do a where.
“add the current buffers directory ”
(if (not (eq major-mode ‘jde-mode))
(error “Must be a jde-mode buffer to add it to the debugger”))
(add-to-list ‘gud-jdb-directories (file-name-directory (buffer-file-name (current-buffer))))
About this entry
You’re currently reading “edebug, why you rule,” an entry on Evadnoob
- February 3, 2008 / 5:08 pm