Skip to content
This repository

Ruby MRI 1.9.3 or 1.9.2 debugger. See also rbx-trepanning

Merge branch 'master' of github.com:rocky/rb-trepanning

Conflicts:
	processor/command/help.rb
latest commit 2c374148ef
R. Bernstein authored July 14, 2013
Octocat-spinner-32 app Update copyright on files changed this year. June 30, 2013
Octocat-spinner-32 bin Lame attempt at post-mortem June 29, 2012
Octocat-spinner-32 data First stab at bindings to simuliate perldb. Alias help expanded. main… June 18, 2011
Octocat-spinner-32 interface More blank stripping March 29, 2013
Octocat-spinner-32 io More blank stripping March 29, 2013
Octocat-spinner-32 lib Start to extra stop blanks from line of lines March 29, 2013
Octocat-spinner-32 processor Merge branch 'master' of github.com:rocky/rb-trepanning July 14, 2013
Octocat-spinner-32 sample Changed to support coderay 1.0. September 30, 2011
Octocat-spinner-32 test Small doc changes. July 14, 2013
Octocat-spinner-32 .gitignore Add test of test-fn_helper.rb October 19, 2010
Octocat-spinner-32 ChangeLog Get ready for release. 0.1.6 November 25, 2012
Octocat-spinner-32 LICENSE Get ready for first public (gemcutter) release. Add copyright, news, … September 13, 2010
Octocat-spinner-32 Makefile Makefile, check-filter.rb: reduce verbosity of testing output. June 20, 2012
Octocat-spinner-32 NEWS Get ready for release. 0.1.6 November 25, 2012
Octocat-spinner-32 README.md Small changes. test-app-complete.rb: add an assertion message. reset:… April 07, 2013
Octocat-spinner-32 Rakefile Gem packaging de jour. Gem packaging stuff keeps moving around. November 25, 2012
Octocat-spinner-32 check-filter.rb Makefile, check-filter.rb: reduce verbosity of testing output. June 20, 2012
Octocat-spinner-32 interface.rb Termination message should be associated with the command processor, … December 09, 2012
Octocat-spinner-32 io.rb Rename "base" files. August 11, 2011
Octocat-spinner-32 processor.rb Separate completion function March 29, 2013
Octocat-spinner-32 trepanning.gemspec README.textile -> README.md December 01, 2012
README.md

The trepanning debugger gdb-like debugger. As such, it is both a high-level and low-level debugger. It is a also a rewrite of ruby-debug. But to provide all of the functionality that it has, it requires a patched version of MRI Ruby 1.9.3 or 1.9.2 found the rb-threadframe project. The additional run-time support in the MRI is what gives this some debugger power that you won't find in other MRI 1.9 debuggers.

See the installation instructions.

There is a google group mailing list for Ruby debuggers.

If trepanning is installed, here is how to run:

   $ trepan ruby-program [program]

If your program needs options of its own:

   $ trepan -- ruby-program [program args...]

If you want to run from the source tree you can do that too:

  cd place-where-trepan-is-installed
 ./bin/trepan -- ruby-program [program args...]

Running from inside irb:

 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:

 require 'trepan'
 Trepan.debug # Don't stop here...
 work # but stop here.

The above is really shorthand for something like:

  $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 was convenient to add a synchronous stop in your program. I don't think that will be 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:

 # ... work, work, work
 mydbg.debugger(:immediate=>true) # enter debugger here
 # ... work, work, work

There is extensive on-line help. Run help inside the debugger.

Something went wrong with that request. Please try again.