New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop pry #360
Drop pry #360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hunchr !
Two things:
- terminal: I believe irb catched up with pry by now. I am in favor of removing pry.
- debug: I cannot judge. I use rubymine. Therefore I am open to any solution wished by people using debug.
I'd like at least a couple of more approvals on this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried it too much with debugging yet to compare. A few notes:
irb
is the standard, so I prefer using it.- The less dependencies the better
pry-rails
should improve thebin/rails console
, but I actually like theirb
provided one way more.- According to https://www.mintbit.com/blog/byebug-replaced-with-debug-rails7
debug
is the default for Rails 7 instead of bybug. It also mentions that ruby 3.1 bundles thedebug
gem,so maybe we don't even need it in the gem file?We need it, otherwise it doesnt' get required and breakpoints aren't working.
I would drop all of them. I use |
But for that you'll need to require the irb gem, no? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove it and use binding.irb
. It can still load the debug
gem for a better experience at runtime: https://github.com/ruby/irb/blob/1a1fbba020f1f504b2cb4d832ee4aa7af6aee0d3/README.md#debugging-with-irb
If you mean bundling it: No. It's a default gem. You can require it directly: https://stdgems.org/irb/ |
I wanted to avoid needeing to do |
Co-authored-by: Raphael Nestler <raphael.nestler@renuo.ch>
this is how I debug:
Suppose we have this code
If I run it with with pry (byebug)
no autocompletion, no syntax highlighting, nothing
If I run it with with irb (debug)
it's so much better. maybe I'm using pry incorrectly but for me pry is completely useless