Skip to content

Instantly share code, notes, and snippets.

@prakashmurthy
Last active September 1, 2016 20:30
Show Gist options
  • Save prakashmurthy/c6439f5b42d47d55687fd8c874c89559 to your computer and use it in GitHub Desktop.
Save prakashmurthy/c6439f5b42d47d55687fd8c874c89559 to your computer and use it in GitHub Desktop.
tracing system stack error when there is no stack trace
$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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment