Sets up debugging:
aborts on thread exceptions
Set the logging level to `:debug`
traces execution of Kernel.system and backtick calls
# File lib/guard/internals/debugging.rb, line 26 def start return if @started ||= false @started = true Thread.abort_on_exception = true UI.level = Logger::DEBUG TRACES.each { |mod, meth| _trace(mod, meth, &method(:_notify)) } @traced = true end
# File lib/guard/internals/debugging.rb, line 38 def stop return unless @started ||= false UI.level = Logger::INFO _reset end
# File lib/guard/internals/debugging.rb, line 46 def _notify(*args) UI.debug "Command execution: #{args.join(' ')}" end
reset singleton - called by tests
# File lib/guard/internals/debugging.rb, line 51 def _reset @started = false return unless @traced TRACES.each { |mod, meth| _untrace(mod, meth) } @traced = false end
# File lib/guard/internals/debugging.rb, line 58 def _trace(mod, meth, &block) Tracing.trace(mod, meth, &block) end
# File lib/guard/internals/debugging.rb, line 62 def _untrace(mod, meth) Tracing.untrace(mod, meth) end