rbs icon indicating copy to clipboard operation
rbs copied to clipboard

[Kernel] Add Kernel.trace_var and Kernel.untrace_var

Open sampersand opened this issue 2 months ago • 2 comments

This PR adds Kernel.trace_var and Kernel.untrace_var in, along with the Kernel::_Tracer interface.

This is a pretty simple PR to ease back into things!

sampersand avatar Oct 17 '25 20:10 sampersand

I agree with adding the methods, but I'm unsure how much management cost we should invest in debugging methods.

ksss avatar Oct 24 '25 08:10 ksss

I don't see a problem with adding them in. I've also used them in code before, such as:

class Logger
  class << self; attr_accessor :debug_lvl end
  trace_var :$DEBUG, &method(:debug_lvl=)
  trace_var :$-d, &method(:debug_lvl=)
end

sampersand avatar Oct 24 '25 19:10 sampersand