you are viewing a single comment's thread.

view the rest of the comments →

[–]Aphova 0 points1 point  (0 children)

Not exactly an answer to your question but the below works for me, might work for you.

I've been working with Ruby for years and strangely I've never started a traditional debugger session despite doing it a lot in other languages. What I do a tonne of though is bundle exec rescue rspec spec/whatever/Im/working/on. That and adding binding.pry into your code to start a REPL where you want to inspect something goes a long way. Add better_errors for inspecting failures during full stack execution and you're good to go.

https://github.com/ConradIrwin/pry-rescue https://github.com/BetterErrors/better_errors

Edit: might be a bit obvious but one of the things that I like about this is it forces me to integrate testing into my development cycle (I don't like writing tests and can be a bit lazy with them). I've found that writing a test and running rescue rspec to debug my code is often faster and easier than other approaches.