I went ahead and simplified the code + made an extension (you
can find it attached).
[Florian, are you reading this?]
BTW, it now works with ruby 1.8 too (just remove the
File.expand_path calls in dbg.rb).
Attached is a fix for getting the correct binding.
rb_eval_string(“binding”) actually returns the binding for “eval”.
args = rb_eval_string(“binding”);
args = rb_funcall( self, rb_intern(“binding”), 0);
The binding is now correct:
say'", "./debugee.rb:4:inhello’", “dbg.rb:37”]
I’ll play around with porting most of the debug.rb functionality into a
console debugger - should not be too hard, as the signature for the
breakpoint_func is the same as for trace_func.
Any ideas on how to make this a remote debugger? Drb is nice, but my
goal is still to integrate this into eclipse, which means Drb is not
going to work (tried running a drb client from Jruby - no luck).