Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add a "pry" command to the 'debugger' gem

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 debugger-pry.gemspec
README.md

debugger-pry

This gem adds a pry command to the debugger gem enabling you to bring up a pry console during your session. It is similar to debugger's built-in irb command.

To see it in action, run ruby examples/foo.rb and type "pry" at the debug prompt.

To use it in a project, add this to your Gemfile:

gem "debugger-pry", :require => "debugger/pry"

For more information on pry, read this article.

Example

(rdb:1) help
ruby-debug help v1.1.3
Type 'help <command-name>' for help on a specific command

Available commands:
backtrace  delete   enable  help  list    pry     restart  source  undisplay
break      disable  eval    info  method  ps      save     step    up       
catch      display  exit    irb   next    putl    set      thread  var      
condition  down     finish  jump  p       quit    show     tmate   where    
continue   edit     frame   kill  pp      reload  skip     trace 

(rdb:1) pry

Frame number: 0/11

From: foo.rb @ line 14 :

     9:   end
    10: end
    11: 
    12: foo = Foo.new(5)
    13: debugger
 => 14: foo.bar += 10

[1] (pry) main: 0> 

Credits

Based on the work of Andrew O'Brien

Something went wrong with that request. Please try again.