Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Available plugins

Brandon Weaver edited this page · 22 revisions

Quick Menu:

  1. / pry-debugger
  2. / pry-byebug
  3. / pry-coolline
  4. / pry-remote
  5. / pry-remote-em
  6. / pry-stack_explorer
  7. / pry-exception_explorer
  8. / pry-vterm_aliases
  9. / pry-syntax-hacks
  10. / pry-em
  11. / pry-theme
  12. / pry-toys
  13. / pry-macro


Author: Nixme Ruby versions: 1.9 MRI

Pry-debugger is a great third-party plugin that provides the long-awaited next ,step and continue commands to Pry. Once this gem is installed, you invoke Pry as normal, however entering next will advance execution along one line:

[1] (pry) main: 0> next

From: ./y.rb @ line 5 in Object#hello:

    1: require 'pry-debugger'
    3: def hello
    4:   binding.pry
 => 5:   x = 20
    6: end
    8: hello

The project is still under development and has some work to go (namely thread-safety) but this gem, together with pry-stack_explorer provides a very capable alternative to ruby-debug, and should satisfy many user's needs for basic debugging primitives.

Back to top


Author: deivid-rodriguez Ruby versions: 2.0+ MRI

Pry-byebug is a fork of pry-debugger. It works just like 'pry-debugger' but overcomes its problems with Ruby 2.0.

Back to top


Author: Mon_Ouie Ruby versions: 1.9.2+ MRI

Pry-coolline is a nifty little Readline replacement that takes advantage of the new stdlib io-console library to provide live syntax highlighting for user input. It's unfortunately limited to Ruby versions 1.9.2+ and MRI, but generally works well.

Back to top


Author: Mon_Ouie

Pry-remote (along with its cousin pry-remote-em) enables you to start instances of Pry in a running program and connect to those instances over a network or the Internet. Once connected you can interact with the internal state of the program. This plugin comes into its own when used with tools such as Pow, enabling you to get a Pry session in places not normally possible. pry-remote is also notable for having pry-nav support.

We set up the server as follows:

require 'pry-remote'

class Foo
  def initialize(x, y)
end 10, 20

Back to top


Author: simulacre Ruby versions: 1.9.2+ MRI

Pry-remote-em is a sophisticated EventMachine-based alternative to pry-remote. It adds user authentication and SSL support along with tab-completion and paging. It also allows multiple clients to connect to the same server, and multiple servers to run on the same computer and even within the same process. pry-remote-em is one of the most exciting projects in the Pry ecosystem, as it opens up possibilities for multi-user remote-debugging/exploration, as well as educational applications. It is also just fun to interact with other programmers in a live environment. One limitation of pry-remote-em at the moment is the lack of pry-nav support, but this will be added in the future.

Starting the pry-remote-em server:

require 'pry-remote-em/server'

class Foo
  def initialize(x, y)
end { 10, 20 }

Back to top


Author: banisterfiend Ruby versions: 1.9.2+ MRI

Pry-stack_explorer  is a powerful plugin that enables navigation of your program's call-stack. From the point a Pry session is started, you can move up the stack through parent frames, examine state, and even evaluate code. Unlike some other debuggers, pry-stack_explorer incurs no runtime cost and enables navigation right up the call-stack to the birth of the program. Together with the pry-nav plugin, it should provide the user with a fairly complete and fast debugging experience in Ruby 1.9.2+ MRI. Pry-stack_explorer provides the show-stack comand as well as up and down

[1] (pry) main: 0> show-stack

Showing all accessible frames in stack (5 in total):
=> #0 [method] gamma <Object#gamma()>
 #1 [method] beta <Object#beta()>
 #2 [method] alpha <Object#alpha()>
 #3 [eval] <main>
 #4 [top] <main>

Back to top


Author: banisterfiend Ruby versions: 1.9.2+ MRI

Pry-exception_explorer is an interactive error console for MRI Ruby 1.9.2+ inspired by the Hammertime gem, which was in turn inspired by consoles found in the Lisp and Smalltalk environments. Unlike the Hammertime gem, we are dropped into the actual context of the exception (with full access to local state) and can even walk the stack (using pry-stack_explorer, discussed above) to isolate the cause of the exception. Rudimentary support for some C-level exceptions is also provided and activated with a command line switch. Another feature of pry-exception_explorer is the ability to define exactly when it kicks-in. This can be as simple as specifying an exception type, or as sophisticated as an assertion over the entire state of the stack. The Plymouth gem works by defining a number of stack assertions for each of the testing libraries it supports. In the example below, we configure a stack assertion so that exception explorer starts when an ArgumentError is raised, but only if the exception context is an instance of MyClass and the parent's context is an instance of MyCallingClass:

EE.intercept do |frame, ex|
  ex.is_a?(ArgumentError) && frame.klass.is_a?(MyClass)) &&

However, this plugin has been deprecated in favor of pre-rescue.

Back to top


Author: EnvyGeeks Ruby versions: 1.8.7+, 1.9+

Pry-VTerm_Aliases brings your bash and zsh aliases into Pry as known shell commands.

Back to top


Author: Conrad Irwin Ruby versions: all

Pry-syntax-hacks adds some syntactic sugar to Pry. Most usefully it allows you to look at instance variables of objects: user.@password, call private/protected methods on objects: user.!hash_password('test'). It also lets you access methods: user.&hash_password, and access variables in previously active pry bindings ( cd): puts ../a.

Back to top


Author: Conrad Irwin Ruby versions: all

Pry-em adds an em: command which allows you to run code in an EventMachine context. It also waits for asynchronous operations to complete, and binds to the callback and errback of deferrables.

Back to top


Author: Kyrylo Silin
Ruby versions: all

Pry Theme plugin helps you to customize your Pry colors via prytheme files. It adds pry-theme command, which allows you to test themes on the fly and and install new ones.

Put your Pry theme in ~/.pry/themes directory and set it up in your config:

# ~/.pryrc
Pry.config.theme = "theme-name"

Back to top


Author: Alex Riabov
Ruby versions: all

Pry Toys adds easy ways to create complex throwaway Ruby object in pry. Now you can quickly create Array of Floats:

Array.toy(3, Float) # => [1.0, 2.0, 3.0]

or Hash with 300 keys:

Hash.toy(300) # => { a: 1, b: 2, ..., kn: 300 }

or String with 2 words:

String.toy(2) # => "ttttttt oooo"

After gem is installed, these toy / throwaway Ruby objects are going to be available for creation when pry is started. To learn more about other arguments you can use to customize toy objects, click here

Back to top


Author: Brandon Weaver
Ruby versions: all

Pry Macro allows you to record a workflow, define a command, and save macros to your .pryrc. This works with both plain ruby and pry commands.

[1] pry(main)> record
[2] pry(main)> 1
=> 1
[4] pry(main)> ls
self.methods: inspect  to_s
locals: _  __  _dir_  _ex_  _file_  _in_  _out_  _pry_

[5] pry(main)> stop -n testing -d 'A test command!'

Run it like any other command:

[6] pry(main)> testing
=> 1
self.methods: inspect  to_s
locals: _  __  _dir_  _ex_  _file_  _in_  _out_  _pry_

Like it? You can save it and have it automatically append to your PryRC:

[10] pry(main)> save-macro testing

Back to top

Something went wrong with that request. Please try again.