From: deivid.rodriguez@... Date: 2018-01-05T19:54:09+00:00 Subject: [ruby-core:84656] [Ruby trunk Feature#14276] Ruby core debugger API Issue #14276 has been updated by deivid (David Rodr��guez). Welcome! Regarding your other proposal: > Creating debug gem in standard lib with the same purpose. Having the guarantee that the unit tests will run for every ruby release. I don't have a strong opinion on this actually, I'm fine with anything. But I emphasize that things are quite stable at the moment. > If I'm not mistaken those APIs are C APIs? The TracePoint API is definitely exposed not only for C-extensions but also for ruby (https://ruby-doc.org/core-2.5.0/TracePoint.html). I don't think the other API is exposed directly but there might be ways to achieve the same stuff it provides in plan ruby, not sure. Actually, my idea for the future of `byebug` is to reimplement the debugger without a C-extension (making the extension optional), and thus indirectly adding support for JRuby and maybe other implementations as well. > require "debug" would bring the debugger up with the minimal functionality. A selected set of the functionality provided by byebug. > Like if it was byebug-base and byebug/ext/byebug would not be needed anymore. Seems like a possibility but note that the C-extension is not about providing "extra" functionality, is about providing the base functionality in a fast way. Also, I actually kind of remember a `debug.rb` file in ruby-core that you could require to get some bare debugging functionality... Not sure though. Hope this helps! ---------------------------------------- Feature #14276: Ruby core debugger API https://bugs.ruby-lang.org/issues/14276#change-69237 * Author: dsferreira (Daniel Ferreira) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I would like to propose the creation of a ruby core minimal API for a Debugger. Historically we have been relying on gems as providers of debug functionality. This has caused problems with debugger APIs being broken and the debugger gems being outdated by ruby releases. This happened in the transitions from 1.8.* to 1.9.* and 1.9.* to 2.** Currently ruby community relies mostly on *byebug* gem (+ pry) for debugging purposes. Recently a new bug [14226](https://bugs.ruby-lang.org/issues/14226) was raised due to changes in ruby internals that broke *byebug*. I consider that the debugger should be a core part of a language like ruby. Developing production code without an available debugger is not very manageable. For this reason I believe we should have a way of guaranteeing that each ruby release will not break the debugger. Also having full control of the debugger API is very convenient for future purposes. This way third party entities can rely on it to develop productivity tools. I see two ways we can accomplish this: - Defining core Debug API namespace where we would create the minimal interface for ruby core debug functionality (Not sure if only cruby or a broader API adopted and designed in collaboration with the other ruby implementations). - Creating debug gem in standard lib with the same purpose. Having the guarantee that the unit tests will run for every ruby release. The main goal in my mind would be to have a bare minimum (TDD?) development environment available upon ruby installation with each bare minimum API providing the base functionality to allow the development of full fledged solutions capable of rivaling with the best solutions in the market. For that goal I would include here for consideration the same approach for other functionalities such as: * Coverage * Documentation * Benchmarks * Tests * Performance * Linter * ? I believe we have currently a good situation with regards to: - Documentation (Rdoc) - Tests (Minitest) Why not try to replicate those examples for the remaining areas? Are documentation and tests so much different from the rest? If we succeeded to do that we could present ruby to the new comer with a simpler development environment easing the entry level. We could put simple documentation in ruby-lang.org to show how to achieve a professional development workflow with ruby with no fuss. A full TDD environment available upon installation it is a great marketing headline in my perspective. Just to finalise. The goal here is not to have ruby core replacing the existing gems. The goal is to give a clear path for these gems while allowing others to develop even further in top of a sound base without worries regarding future support on the APIs being used. -- https://bugs.ruby-lang.org/ Unsubscribe: