What is the best way to debug fastcgi scripts?
Do you use Ruby? Expect? Or just deal with 'incomplete header' messages in the Apache logs?
What is the best way to debug fastcgi scripts?
Do you use Ruby? Expect? Or just deal with 'incomplete header' messages in the Apache logs?
Hi,
What is the best way to debug fastcgi scripts?
I am not sure how fastcgi relates to regular cgi scripts. But for
those I really like prettyexception. See
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/108882
But perhaps my answer is completely off from your question.
Patrick
1) Run the equivalent as a regular CGI, make sure it works.
2) Swear
3) Play with rescue and printing to STDERR until you find the error.
On 06 Dec 2004, at 06:02, J. D. wrote:
What is the best way to debug fastcgi scripts?
Do you use Ruby? Expect? Or just deal with 'incomplete header' messages in the Apache logs?
J. D. wrote:
What is the best way to debug fastcgi scripts?
Do you use Ruby? Expect? Or just deal with 'incomplete header' messages in the Apache logs?
Argh, that error message always makes me mad. I'm sure Apache can be configured so we can see the script's STDERR on some logs, but so far I didn't know how.
Sometimes switching to CGI doesn't help, as you need to know what went wrong on _that particular request_...
--
dave
J. D. wrote:
What is the best way to debug fastcgi scripts?
Remote breakpoints might be a good option here -- they let you connect an irb shell to any given point of your application meaning you can just use Ruby's regular introspection facilities to have a look at local variables, instance variables, call traces, methods and modify Object altogether. Attached to this mail you will find the latest mostly stable version which will turn into a release soon. If everything goes well this should be merged back into dev-utils and be available in Ruby On Rails with a few nice goodies (a link to launch a breakpoint from the error page you get in your browser when an uncaught exception of your application occurs) very soon.
binding_of_caller.rb (2.65 KB)
breakpoint.rb (14.6 KB)
breakpoint_client.rb (3.51 KB)