Skip to content

Instantly share code, notes, and snippets.

@rahim
Created February 5, 2025 14:11
Show Gist options
  • Save rahim/d86d112f84736267e0cca3bdae75c09e to your computer and use it in GitHub Desktop.
Save rahim/d86d112f84736267e0cca3bdae75c09e to your computer and use it in GitHub Desktop.
Ruby: trace all method calls...
trace = TracePoint.new(:call) do |tp|
puts "#{Time.now.iso8601} Called: #{tp.defined_class}##{tp.method_id} at #{tp.path}:#{tp.lineno}"
end
trace.enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment