From: Mikael Brockman Date: 2004-10-13T05:19:54+09:00 Subject: Re: [ANN] breakpoint.rb -- now with remote debugging Alexey Verkhovsky writes: > On Mon, 2004-10-11 at 18:29, Florian Gross wrote: > > This new version includes support for remote debugging via DRb. Using > > this you can now also debug your CGI and Rails applications > > Thank you SO much! > > One small inconvenience that I have with this library is that it takes > some typing to set a breakpoint. > > Say I have a util.rb file that is included more or less everywhere in my > app, and I would like to include there something like this: > > def bp > require 'breakpoint' > breakpoint > end > > so that setting a breakpoint would be simply 'bp' > > This doesn't work, of course, because it opens irb in a wrong stack > frame (within bp method). > > Any Ruby black magic to somehow inline it in the right stack frame? Maybe you could use Florian Gro�'s Binding.of_caller to evaluate 'breakpoint' in the caller's binding.