Victus Spiritus


Ruby Debugger, interactive code analysis

04 Apr 2012

Hat tip to intridea, and of course the definitive documentation

1) install the gem.

2) place the hook. Enter "debugger" where ever you want your debugging session to begin.

3) navigate the code

h is for help, what can you do
l is for list, where are you in the code
n is for next line, step over
s is for step in
fin is for finish / step out
p is for print, p

That's it.

There's more to it, but that should be enough to understand and evaluate the state of your code.