Skip to content

Instantly share code, notes, and snippets.

@dgilperez
Created November 14, 2016 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgilperez/48c8594a9658072292ec37d761afe8ba to your computer and use it in GitHub Desktop.
Save dgilperez/48c8594a9658072292ec37d761afe8ba to your computer and use it in GitHub Desktop.
StackLevelTooDeep tracer
$enable_tracing = false
$trace_out = open('trace.txt', 'w')
set_trace_func proc { |event, file, line, id, binding, classname|
if $enable_tracing && event == 'call'
$trace_out.puts "#{file}:#{line} #{classname}##{id}"
end
}
$enable_tracing = true
my_shitty_method_call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment