# Re: debugging proposal

**URL:** <https://www.ruby-forum.com/t/re-debugging-proposal/97431>\
**Category:** Ruby\
**Created:** [July 7, 2006, 1:38am UTC](https://www.ruby-forum.com/t/re-debugging-proposal/97431 "2006-07-07T01:38:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fangheuschrecke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/58956e/32.png) [@fangheuschrecke](https://www.ruby-forum.com/u/fangheuschrecke)\
**Post date:** [July 7, 2006, 1:38am UTC](https://www.ruby-forum.com/t/re-debugging-proposal/97431/1 "2006-07-07T01:38:22Z")

</div>

> 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).

Excellent!

Attached is a fix for getting the correct binding.  
rb\_eval\_string(“binding”) actually returns the binding for “eval”.

Changed:  
args[4] = rb\_eval\_string(“binding”);

To:  
args[4] = rb\_funcall( self, rb\_intern(“binding”), 0);

The binding is now correct:

(Dbg):caller  
["./debugee.rb:8:in `say'", "./debugee.rb:4:in`hello’", “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).

Cheers,  
Max
