Skip to content

Instantly share code, notes, and snippets.

@oddlyzen
Created September 20, 2011 18:34
Show Gist options
  • Select an option

  • Save oddlyzen/1229903 to your computer and use it in GitHub Desktop.

Select an option

Save oddlyzen/1229903 to your computer and use it in GitHub Desktop.
Tracing Ruby Execution
set_trace_func proc { |event, file, line, id, binding, classname|
printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname
}
t = Test.new
t.test
set_trace_func nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment