Created
December 22, 2017 11:06
-
-
Save marcocarvalho/8ff4d09785067c4118e43235d72948f7 to your computer and use it in GitHub Desktop.
Ver por onde o código bate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@trace = [] | |
set_trace_func proc { |event, file, line, id, binding, classname| | |
if event == 'call' && ( file.index('/app/') || file.index('gaia') ) | |
@trace << { number: @trace.count, event: event, file: file, line: line, method_name: id, classname: classname.to_s } | |
end | |
} | |
# Code you want to inspect | |
set_trace_func nil | |
File.open('inspected_instructions', 'w+') { |f| f.write(@trace.to_json) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment