Debugging

Print something

Edit program to print something, then rerun the program:

puts "something"

Use debugging tool

Use debugging program to investigate or alter the internal state of a running program:

binding.irb
binding.pry

Instruments

dtrace / dtruss a running program.1

sudo dtruss bundle install