Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pry - An IRB Alternative on Steroids (Part 2)

Pry - An IRB Alternative on Steroids (Part 2)

Following Part 1 (https://speakerdeck.com/u/rahult/p/pry-an-irb-alternative-on-steroids-part-1) I discuss some advanced pry features and plugins like debugger, stack explorer, exception explorer etc.

Rahul Trikha

October 02, 2012
Tweet

More Decks by Rahul Trikha

Other Decks in Programming

Transcript

  1. Agenda • Recap of Part 1 • Pry? • Basic

    Commands • Remote (pry-remote) • Debugger (pry-debugger) • Stack Explorer (pry-stack_explorer) • Exception Explorer (pry-exception_explorer) • Developer tools (pry-developer_tools) • Pry Plugins
  2. Recap of Part 1 https://speakerdeck.com/u/rahult/p/pry-an-irb-alternative-on-steroids • Pry? (REPL - Read

    Evaluate Print Loop) • Basic Commands • Installation (gem install pry or gem 'pry-rails') • Navigation (cd, ls, find-method) • Viewing docs (show-doc - ?) • Viewing code (show-source - $) • Editing code (edit-method, edit) • Runtime invocation (binding.pry)
  3. Remote (pry-remote) A way to start Pry remotely and to

    connect to it using DRb. This allows to access the state of the running program from anywhere. https://github.com/Mon-Ouie/pry-remote
  4. Debugger (pry-debugger) Adds step, next, finish, and continue commands and

    breakpoints to Pry using debugger. https://github.com/nixme/pry-debugger
  5. Stack Explorer (pry-stack_explorer) pry- stack_explorer is a plugin for the

    Pry REPL that enables the user to navigate the call- stack. The up, down, frame and show- stack commands are provided. https://github.com/pry/pry-stack_explorer
  6. Exception Explorer (pry-exception_explorer) 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. pry-exception_explorer is a plugin for the Pry REPL. https://github.com/pry/pry-exception_explorer
  7. Developer Tools pry-developer_tools is a collection of Pry commands that

    are useful for Pry developers and Pry plugin developers. It provides commands that you can use to edit, reload, or define commands while in a Pry session. https://github.com/pry/ pry-developer_tools
  8. Pry Plugins Pry can be extended by way of plugins.

    A plugin is very simple - it is just a gem that is automatically loaded when a Pry session starts. Plugins can be used to modify almost any aspect of Pry. https://github.com/pry/ pry/wiki/Plugins