POSTS

Ruby Debugger Things I Always Forget

Blog

Continuing on a theme seen about Perl. Basic commands are not covered ( list , print, continue, etc. )

  1. Install rdebug: sudo gem install rdebug -y

  2. Open a session: rdebug script

  3. Always show a listing after every command: set autolist

  4. Show a variable consistently: display variableName

  5. …or the result of a method on a variable: display variableName.methodName

  6. Conditional break…conditionally: break ./fileName:lineNumer [if condition]

  7. See where you are in the stack ( especially handy if you like recursion, like me ): where

  8. Move up/down in the stack: up/down

  9. Go to the nth frame in the stack: frame n