On Thu, Sep 3, 2009 at 08:45, Hans Hübnerhans.huebner@gmail.com wrote:
We have removed the backtrace support from Hunchentoot because we wanted to get rid of all non-essential system dependencies. For interactive debugging, the *BREAK-ON-SIGNALS* special variable can (should) be used, it can do what the presented acceptor subclass can do. If you really need backtraces in your log files, the trivial-backtrace [2] library may be useful.
IME, *break-on-signals* didn't work too well when I was debugging my hunchentoot application. (I don't remember exactly what the problem was, sorry.) However, with just two definitions (posted in April[1]), HT gets much more debuggable in interactive use:
(defclass debuggable-acceptor (hunchentoot:acceptor) ())
(defmethod acceptor-request-dispatcher ((*acceptor* debuggable-acceptor)) (let ((dispatcher (call-next-method))) (lambda (request) (handler-bind ((error #'invoke-debugger)) (funcall dispatcher request)))))
Then, you use the hunchentoot web service with (make-instance 'debuggable-acceptor :port 4242), and you'll get a (swank) debugger every time an error condition slips through.
Hope that helps.
[1] http://common-lisp.net/pipermail/tbnl-devel/2009-April/004688.html