Christopher Allan Webber

Edebug and lisp debugging

Christopher Allan Webber at

Occasionally I write scripts in Hy, and I've been writing more code in Guile, but there's something I really miss about emacs lisp... yes, emacs lisp isn't generally considered the nicest lisp by many, but here is one damned nice feature: edebug macro insturmentation.

What's nice about this is that if you're using a bugger, you can continue to step forward form by form (similar how one might step forward line by line in pdb) even when you approach a macro, without expanding the macro at the debugger's cursor... it lets you step through it in the way the macro is written, because the way the macro works is described. Given that macros can expand into anything, otherwise else the debugger has to throw up its hands at this point, or actually expand the macro (not a bad option, but not as good for sure).

For all the shit emacs lisp gets for being a lame lisp, that's one cool feature. I can't find any evidence that any other lisp implements this. (Too bad... I'd love to implement it for Hy, though it looks like it'd be impossible.)

Did you ask about such a feature in Guile?  I'm curious if something similar exists or if others want such a feature.  Looks neat!

David Thompson at 2014-09-12T16:20:03Z

I heard some stuff in #guile about improving GUD integration with guile, which may involve code stepping and etc, but i don't think macro instrumentation exists in guile-the-language so not sure how that would handle this. But hey, why not ask now? :)

Christopher Allan Webber at 2014-09-12T16:22:53Z

Wow, cool. Playing with Scheme or CL I just get utterly lost when being subjected to expanded macros.

Claes Wallin (韋嘉誠) at 2014-09-12T17:22:29Z