Debugging with breakpoint
# Breakpoints allow you to step into a running program and poke around its 
# innards. This ability is great for both debugging and code exploration.

# Specifically, a breakpoint will pop up an interactive ruby(irb) session 
# at a pre-defined break point in a Ruby application.

Quick tips:

* use CTRL-D (Unix) or CTRL-Z (Windows) or exit to leave the breakpoint and continue running the program
* use exit! to terminate the program from within a breakpoint
* other interesting things to check out include: local_variables, instance_variables, caller, methods
* just type the name of your variable to check its value
* Note that you can enter any type of regular Ruby code into a breakpoint IRB shell. You can even hot patch your deployed code to fix a problem at run-time!
Language Ruby / Tagged with debugging