Sha256: b04acea38795ad39af34abcf928187db4024e2228a14a02edc12d8ccbc130619
Contents?: true
Size: 1.87 KB
Versions: 6
Compression:
Stored size: 1.87 KB
Contents
A modular, testable debugger for Ruby 1.9.2. A total rewrite of _ruby-debug_. __In order to use this debugger, you'll need a patched Ruby 1.9.2 and some additional packages. See the "installation instructions.":http://wiki.github.com/rocky/rb-trepanning/how-to-install-rbdbgr__ Right now this debugger is beta code. There is a "google group mailing list":http://groups.google.com/group/ruby-debugger for Ruby debuggers. If rb-trepanning is installed, here is how to run: bc. trepan ruby-program [program] If your program needs options of its own: bc. trepan -- ruby-program [program args...] If you want to run from the source tree you can do that too: bc. cd place-where-trepan-is-installed: ./bin/trepan -- ruby-program [program args...] Running from inside _irb_: bc. require 'trepanning' Trepan.debug { your code } The return value from Trepan is the return value of the block, i.e. the final value in the block. You can run the same thing inside your Ruby program, but probably you don't want to give a block. Instead, you may want to have debugging start on the next statement in the code: bc. require 'trepan' Trepan.debug # Don't stop here... work # but stop here. The above is really shorthand for something like: bc. $trepan = Trepan.new $trepan.debugger The global variable $trepan set holds debugger settings, such as "autolist" or "autoeval" settings and breakpoint information. Due to the line-event orientation in ruby-debug, it occasionally it was convenient to add a synchronous stop in your program. I don't think that will as necessary here, but if you do call to the debugger at the point of the call rather than the subsequent stopping point, set opts[:immediate] to true. Example: bc. # ... work, work, work mydbg.debugger(:immediate=>true) # enter debugger here # ... work, work, work There is extensive on-line help. Run "help" inside the debugger.
Version data entries
6 entries across 6 versions & 1 rubygems