[hunchentoot-devel] resurrect tbnl's debug-value macro?

Mac Chan emailmac at gmail.com
Thu May 3 17:46:37 UTC 2007


Hi Pierre,

On 5/3/07, Pierre THIERRY <nowhere.man at levallois.eu.org> wrote:
> The *debug-mode* behaviour won't scale,
> because you have to be sure there will only be a single HTTP request
> sent to the server, or the various variables will be overwritten.

While in development, I'll be the only person sending http request, so
this is a controlled environment. But this is really not the issue
though. For debugging what Edi suggested is the way to go.

> Just do it yourself, with a handler "leaking" the objects you want to
> inspect:
>
> (defvar *leak*)
>
> (defun leaking-handler ()
>   (setf *leak* (list *request* *reply*))
>   "<html><head><title>Leaked</title></head><body>Leaked.</body></html>")

No this won't solve the issue that I brought up.

If you test your handler in the REPL, it will complain that *response*
is not bound.

Your *leak* object won't do any good here, you'll have to manually
bind *request* to *leak* (and you can't automate this in your handler
because at that time *request* is dynamically bound and you cannot set
the global value of *request*)

But yeah there are other ways to do it. I just bring this up to see if
this is something that other hunchentoot users would want to have
built-in.

Regards,
-- Mac



More information about the Tbnl-devel mailing list