From: Jonathan Paisley Date: 2004-11-24T18:53:05+09:00 Subject: Breakpoint/Drb (was [SOLUTION] Object Browser (#8)) Hi Florian, Would you consider adding some description (such as your text below) to the Drb version of breakpoint.rb? I spent some time reading the code to figure this out, and perhaps it might be a useful addition to help others to get an overview of how it works. On a related point, I discovered that if I attempt tab completion in the Drb-ified IRB session the server side crashes since it uses plain eval() against a Drb-proxy of the binding, which fails. Any idea how to fix this? ruby--1.8.2p2/lib/ruby/1.8/irb/completion.rb:160:in `eval': wrong argument type DRb::DRbObject (expected Proc/Binding) (TypeError) Many thanks. Jonathan On Tue, 23 Nov 2004 21:07:25 +0100, Florian Gross wrote: > The remote ones work by running part of an irb session at the server and > part of it on the client. The communication is done transparently via > DRb. This required a bit of hacking, but in this case the only important > thing is really that you can use drb_service.evaluate(nil, code) for > evaluating arbitrary code. > > Breakpoints themself just cause an IRB shell to spawn in the current > context at the current line of code. Some Binding.of_caller magic is > used for making the interface transparent. > > There's a few extensions over that basic principle (assume, being able > to return a custom value from a breakpoint, getting the source code > where the breakpoint was triggered and so on), but it's really all not > too complex. > > Feel free to ask if that explanation was not in detail enough for your > needs. I'd be pleased to help out. I think a good GUI interface like the > ones you and Jamis did would really be a very nice addition to the > Breakpoint package. (And also dev-utils, IMHO)