

Debugging Lisp Part 1: Recompilation - raphaelss
http://malisper.me/2015/07/07/debugging-lisp-part-1-recompilation/

======
pavelludiq
On more than one occation when writing web code I found myself in the debugger
in the middle of a request handler. The browser just sits there waiting for a
response. I found the bug and restarted the handler before the browser time-
outed. The browser recieved the response as if a bug never existed. Of course
this only works if you can find and fix a bug in under 120 seconds :)

------
bainsfather
As a non-lisp user, this {easy-debug -> fix -> resume program} appears to be
extremely useful, and something that only lisp offers.

e.g. wading through clojure stack traces seems very primitive in comparison.

How important is it in practice? Can/could other languages do this?

As an outsider looking at new (to me) languages, it's hard to judge what the
pros and cons of a language are - especially the cons - e.g. several years
ago, when looking at clojure, it took a lot of searching before I concluded
that clojure did _not_ have this feature (maybe that has changed now?).
Meanwhile the 'learn language x' books always seem to focus only on syntax,
rather than workflow.

~~~
yeureka
Edit and Continue in Visual Studio is similar to that. You can change the
source code while the program is paused in the debugger, for instance in a
breakpoint, and continue after your modifications.

~~~
bainsfather
Interesting, thanks.

Do you get the ability to move the execution point back to _before_ the the
error, in order to resume execution? - from what I can tell, this isn't
possible - from
[https://msdn.microsoft.com/library/y740d9d3.aspx#BKMK_Set_th...](https://msdn.microsoft.com/library/y740d9d3.aspx#BKMK_Set_the_next_statement_to_execute)

"Setting the next statement causes the program counter to jump directly to the
new location. Use this command with caution:"

"If you move the execution point backwards, intervening instructions are not
undone. "

~~~
yeureka
Not sure, I have never tried moving the instruction pointer after Edit &
Continue. Moving the instruction pointer backwards has been fine in my
experience if you choose a suitable line to reset your state.

