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

Beginner Ruby - Debugging with Pry

Beginner Ruby - Debugging with Pry

Presented at Ann Arbor Ruby Brigade "Beginner Talks" 3/31

rock-paper-scissors-lizard-spock (https://github.com/saragibby/rock-paper-scissors-lizard-spock)

Sara Gibbons

March 31, 2015
Tweet

More Decks by Sara Gibbons

Other Decks in Technology

Transcript

  1. pry commands cd: Move into a new context (object or

    scope). ls: Show the list of vars and methods in the current scope. watch: Watch the value of an expression and print a notification whenever it changes. whereami: Show code surrounding the current context. wtf?: Show the backtrace of the most recent exception. hist: Show and replay readline history. exit: Pop the previous binding.
  2. pry-byebug gem 'pry-byebug' step: Step execution into the next line

    or method. next: Step over to the next line within the same frame. finish: Execute until current stack frame returns. continue: Continue program execution and end the Pry session. up: Moves the stack frame up. down: Moves the stack frame down. frame: Moves to a specific frame. break: Set or edit a breakpoint
  3. Other things that make Pry cool 4 command shell integration

    4 custom commands 4 edit code within Pry session
  4. Shameless self-promotion Detroit.rb Thursday 4/2 GDI AA - Intro to

    Git & GitHub Workshop Tuesday 4/14 GDI AA - Code & Coffee Saturday 4/18 GDI Detroit - Code & Tea Sunday 4/19
  5. Shameless self-promotion II GDI Detroit - Code & Cocktails Wednesday

    4/29 GDI Detroit - Intro to Ruby May/June GDI Ann Arbor Slack channel https://gdiaa-slack.herokuapp.com/