TraceFiles
Gem for tracing Ruby files.
require 'trace_files'
TraceFiles.set trace: [__FILE__]
Glob example.
require 'trace_files'
targets = Dir.glob(File.join(__dir__, '../lib/**/*.rb'))
targets.map! { |t| File.expand_path t }
puts "Tracing: #{targets}"
TraceFiles.set trace: targets
The TraceFiles.set
method returns a TracePoint
object.
trace_point = TraceFiles.set trace: [__FILE__], color: false
trace_point.disable
trace_point.enable
trace_point.enabled?