Alexey Verkhovsky
1/22/2006 10:45:00 PM
Eero Saynatkari wrote:
>>Say, we have a Ruby app going into an endless loop (or perhaps a thread
>>deadlock) mode. Let us further assume that it happens in production and
>>you don't know how to reproduce it anywhere else. How would you debug
>>this?
>>
>>
>Can you do ruby -rdebug program.rb instead of running it normally?
>
>
By the conditions of our imaginary problem, we only reproduce our
endless loop in the production environment, and -rdebug makes a typical
Ruby code two orders of magnitude slower, so this wouldn't do.
Florian Groß wrote:
> This might work and give you a remote debugging back door. I'm just
not sure if it will survive deadlocks:
> require 'breakpoint'
...
> You can then connect to your application with breakpoint_client.
Hi, Florian,
Remote 'breakpointer' might be a workable idea. But when I am in IRB,
how do I get stack traces for all currently running threads?
Rest assured, I do know where to find 'breakpoint' library - I keep
telling about it to everyone pissed off or puzzled by the absence of a
decent debugger in the Ruby world.
Alex