[web-devel] Re: adding debug output to a response

Michael Snoyman michael at snoyman.com
Mon Nov 29 18:24:43 CET 2010

On Mon, Nov 29, 2010 at 5:56 PM, Simon Michael <simon at joyful.com> wrote:
> Thanks, I did not know about onRequest.
> I want to send debug output immediately to the response, so that it appears
> on the rendered web page intermixed with the regular content. Ie I'm
> wondering is if there's an equivalent of trace for the web output.

Not really. In Yesod the entire response body is formed before being
sent out, so during the "processing" phase, you can't inject
information into the output stream like you can in PHP. If you're
using a Hamlet template, you could stick debugging output in there,
but that's probably not what you want.

If you give an example of the type of debugging output you are trying
to achieve, it might give some insight.


More information about the web-devel mailing list