Skip to content
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

Use just IRB for debugging #855

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Use just IRB for debugging #855

wants to merge 2 commits into from

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Jan 15, 2022

Summary

Use plain irb for debugging and for demonstrating debugging

Details, Motivation and Context

Development of pry has stalled and it is suggested that debug in combination with irb is the future. For now, we cannot use debug yet since only a very old version runs on Ruby 2.5.

For now, this change removes the pry, pry-doc, byebug and pry-byebug dependencies. If needed for local development, these can be added back via Gemfile.local.

Debugging inside a scenario using Aruba is now demonstrated using plain irb. This has the added advantage of also working on JRuby.

Once support for Ruby 2.5 has been dropped, the new debug gem can be added as a permanent dependency to provide extended debugging features by default.

How Has This Been Tested?

I did a simple debug session with debug. This worked on Ruby 3.1, but not really on 2.5.

I ran the adjusted scenario on Ruby 3.1 and JRuby.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Internal change (refactoring, test improvements, developer experience or update of dependencies)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

=> 8: binding.irb
9:
10: exit 0
Switch to inspect mode.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be much we can do about this. Maybe we should keep pry around for now and just drop byebug.

@mvz mvz added on-hold This issue is waiting for something else to happen first. status: needs rework and removed on-hold This issue is waiting for something else to happen first. labels Jan 15, 2022
Plain irb works fine for demonstrating this feature, and in addition works
well on JRuby, so we can run the scenario everywhere now.
Development of pry has stalled and it is suggested that debug in
combination with irb is the future. For now, we cannot use debug yet
since only a very old version runs on Ruby 2.5.

For now, this change removes the pry, pry-doc, byebug and pry-byebug
dependencies. These can be added back via Gemfile.local.

Once support for Ruby 2.5 has been dropped, the new debug gem can be
added as a permanent dependency to provide extended debugging features
by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant