debug fastcgi streams while forwarding them
fcgi-debug helps you to trace what happens with your fastcgi programs without having to strace them; it just sits between webserver and your fastcgi program and forwards all content while analysing it.
For running you probably want spawn-fcgi, don't use the versions included in lighttpd (they close stdin/stderr so you won't see any output).
Example usage (assuming the binary is in build/fcgi-debug, starts a fastcgi server listening on port 1026):
spawn-fcgi -C 0 -p 1026 -n -- build/fcgi-debug /usr/bin/php5-cgi