debug.gem blog: initial commit

About this series of articles

This series introduce features of ruby/debug: Debugging functionality for Ruby now I’m working on. debug.gem will be introduced into Ruby 3.1 which will be released Dec/2021.

This article introduce about debug….


This content originally appeared on DEV Community and was authored by Koichi Sasada

About this series of articles

This series introduce features of ruby/debug: Debugging functionality for Ruby now I'm working on. debug.gem will be introduced into Ruby 3.1 which will be released Dec/2021.

This article introduce about debug.gem, the background and the motivation.

BTW see the recent article A Sneak Peek of Ruby's New Debugger! by @st0012 . His great article introduces debug.gem from Ruby on Rails developer perspective.

Background and motivation

debug.gem is a debugger for Ruby. It is new replacement of lib/debug.rb which is installed from ancient Ruby 1.3.1 (!!). However, lib/debug.rb is not maintained well long time and nobody uses it. Surprisingly, most of features works on recent Ruby versions. However, it introduce performance penalties to the application and it lacks important features like flexible breakpoint setting or remote debugging or IDE integration (it can integrate with emacs, though) and so on. Also it doesn't have cosmetic features like coloring.

Maybe byebug (deivid-rodriguez/byebug: Debugging in Ruby 2) is most famous Ruby's debugger in recent years. byebug has enough features, however it doesn't utilize recent added TracePoint features for debuggers, so it is slow when some breakpoint is set.

byebug supports threading. However Ruby 3.0 introduced Ractor (ruby/ractor.md at master · ruby/ruby). Ractor enables to make parallel program in Ruby, but the parallel programming is difficult and it needs support for debugging. However, it is hard to support ractors by existing debuggers.

Hidden but the most important motivation is I (Koichi) likes to make a developer support tools. I feel that using debugger is difficult for the programmers. It is challenging topic to provide useful features for many Rubyists.

Making a new gem

We talked about replacement plan of lib/debug.rb. Fortunately we can reserve "debug" gem name in rubygem.org so we decided to make a new gem and replace with lib/debug.rb

Conclusion

This article introduces the background and the motivation of debug.gem.

There is no debugger implementation to utilize MRI's new features for debuggers and no debugger supports Ractors. This is why we decided to make a new debugger.

I really appreciate any feedback about debug.gem. Next I will introduce basic features of debug.gem.

Acknowledgements

  • This work is supported by Cookpad, an employer of me (Koichi). In recent months Cookpad allowed me to focus on the debugger development.
  • Naoto Ono helps us to prepare testing framework on Google summer of code project (Ruby | Google Summer of Code).
  • Stan Lo contributes appealing features like text coloring and tells us the debugger experience on his projects.
  • And all contributors!


This content originally appeared on DEV Community and was authored by Koichi Sasada


Print Share Comment Cite Upload Translate Updates
APA

Koichi Sasada | Sciencx (2021-07-31T16:34:03+00:00) debug.gem blog: initial commit. Retrieved from https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/

MLA
" » debug.gem blog: initial commit." Koichi Sasada | Sciencx - Saturday July 31, 2021, https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/
HARVARD
Koichi Sasada | Sciencx Saturday July 31, 2021 » debug.gem blog: initial commit., viewed ,<https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/>
VANCOUVER
Koichi Sasada | Sciencx - » debug.gem blog: initial commit. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/
CHICAGO
" » debug.gem blog: initial commit." Koichi Sasada | Sciencx - Accessed . https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/
IEEE
" » debug.gem blog: initial commit." Koichi Sasada | Sciencx [Online]. Available: https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/. [Accessed: ]
rf:citation
» debug.gem blog: initial commit | Koichi Sasada | Sciencx | https://www.scien.cx/2021/07/31/debug-gem-blog-initial-commit/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.