Skip to content

Instantly share code, notes, and snippets.

@rwehresmann
Created October 31, 2022 11:10
Show Gist options
  • Select an option

  • Save rwehresmann/17d63a60aeeac28506f400d1e5166959 to your computer and use it in GitHub Desktop.

Select an option

Save rwehresmann/17d63a60aeeac28506f400d1e5166959 to your computer and use it in GitHub Desktop.
Enable ruby tracing of method calls
tracer = TracePoint.new(:c_call) do |tp| p [tp.lineno, tp.event, tp.defined_class, tp.method_id] end
tracer.enable { Time.now.to_json }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment