POSTS
Ruby Debugger Things I Always Forget
BlogContinuing on a theme seen about Perl. Basic commands are not covered ( list , print, continue, etc. )
-
Install rdebug: sudo gem install rdebug -y
-
Open a session: rdebug script
-
Always show a listing after every command: set autolist
-
Show a variable consistently: display variableName
-
…or the result of a method on a variable: display variableName.methodName
-
Conditional break…conditionally: break ./fileName:lineNumer [if condition]
-
See where you are in the stack ( especially handy if you like recursion, like me ): where
-
Move up/down in the stack: up/down
-
Go to the nth frame in the stack: frame n