2023-04-26 - OOP
- back to Le Wagon's Bootcamp log.
main topics
- debugging
- pry-byebug
debugging
This seems to be an useful reading: https://www.theodinproject.com/lessons/ruby-debugging
pry-byebug
require 'pry-byebug'
# ...
# add this line in the part of the code I want to debug
binding.pry
# ...
When the flow reaches that line it launches irb. And you can inspect the variables.
Use next
to execute the next line of code.