Welcome to the Ruby Debugging repository. The goal of this repository is to get you familiar with common debugging tools and idioms. At the end of it I hope you will have a better understanding of Ruby itself.
Each exercise will present new idioms or reinforce existing ones.
Topics covered:
- ruby/debug
- ancestors
- singleton_class.ancestors
- methods
- methods.grep
- instance_variables
- instance_methods
- public_methods
- private_methods
- method(:method_name).source_location
- method(:method_name).super_method.source_location
- backtrace
- caller
- TracePoint
- Ruby version
3.1.0
or higher bundle install --path vendor/bundle
- Clone this repository
- Work your way through each level, for example:
cd 01/
bundle exec ruby main.rb
Warning Do not forget to
bundle install --path vendor/bundle
and to run the examples withbundle exec
Every problem has an associated README.md
file with instructions and hints. Pay special attention to the "New concepts" section and try to replicate thre commands since it will introduce new concepts that you might not be familiar with and will help you through your debugging journey.
Warning Do not forget to
cd
into each challenge folder.
Every solved exercise should include the following output.
Framework: Ruby
Version: 3.2.2
Workshop: Ruby debugging
- Ruby-Doc.org
- Metaprogramming Ruby
- I am a puts debuggerer
- Ruby Debugging Magic Cheat Sheet
- Debugging Rails Applications
- Open an Issue or Pull Request
- Reach out @bernardo_amc on Twitter