gem 'debugger', group: [:development, :test]
- Add
debugger
to anywhere in code that needs a breakpoint. - Refresh the page, the
rails server
terminal will stop, usehelp
.list
orl
show the line in codepp
is pretty print a variablestep
,next/n
,continue
irb
to ruby shell
range = date.beginning_of_day..date.end_of_day