Levin Alexander wrote:

> On 9/6/05, mathew <meta / pobox.com> wrote:
>> That is, if I have the source file open in my editor, I'd like to be
>> able to write something like
>>
>>     trigger_debugger if $DEBUG
>
> $ gem install ruby-breakpoint
>
> require 'rubygems'
> require 'breakpoint'
>
> breakpoint if $DEBUG
> 
> puts you into an interactive irb session

Or, to stop in the debugger, try this:

         defined? DEBUGGER__ and Process.kill("INT",0)