Note: Ruby Jard is still under heavy development. Bugs and weird behaviors are expected. If you see one, please don't hesitate to open an issue. I'll try my best to fix.
Install Ruby Jard
- Ruby Gem
Add one of those lines into your Gemfile. Note: Ruby Jard is discouraged to use on production environment.
If you would like to use Ruby Jard to debug a test, you can add to group test too.
If you would like to use edged developing version of Ruby Jard:
Run your program with Ruby Jard
To use Ruby Jard, you just need to put
jard magic method before any places you want to stop. Jard supports stopping at anywhere, including top level binding, instance methods, class methods, string evaluation, or even inside a class declaration.
Afterward, run your program, just like normally. If your program meets
jard execution break point, it gonna stop, show the UI, and let you debug.
In case you meet error
undefined local variable or method jard, please require ruby_jard manually at initializing scripts. If you use Ruby Jard with famous frameworks, ruby_jard will be loaded by default
- Ruby Jard supports official Ruby versions: 2.5.x, 2.6.x, 2.7.x, 2.8.x - 3.0.x (in ruby trunk).
- Truffle Ruby support is in the Roadmap.
- jRuby support is not promised yet, as byebug core is written in C.
- Ruby Jard is developed, and tested on Linux distros, and MacOS.
- Windows is not supported (yet).
Ruby Jard depends on 3 dependencies:
byebug, compatibility: '>= 9.1', '< 12.0'
pry, compatibility: '~> 0.13.0'
tty-screen, compatibility: '~> 0.8.1'
Ruby Jard is compatible with
byebug. They can be used along with each other without conflicts. However, as soon as Jard already started (via
jard magic method call), this compatibility is not guaranteed.