SES Tracer v1.5
by Solistra and Enelvon
Introductionby Solistra and Enelvon
This script provides a simple, customizable tracer which can be used as a debugger or information-gathering tool for Ruby code. By default, the output from the tracer shows a visual representation of the Ruby call stack with relevant information. This is primarily a scripting and debugging tool.
Change Log
- v1.5 (April 18th, 2014) - General bug fixes and API improvements.
- v1.4 (April 17th, 2014) - Automatic tracing now accommodates singleton methods.
- v1.3 (April 15th, 2014) - Enelvon added support for automatic method tracing.
- v1.2 (April 11th, 2014) - Updated Tracer.start.
- v1.1 (April 11th, 2014) - Minor API update.
- v1.0 (April 11th, 2014) - Initial release.
- Highly customizable tracing of Ruby code at run-time.
- A default trace formatter displaying the call stack.
- Allows setting of a conditional to filter trace operations.
- Able to trace specified methods whenever they are run.
[IMG]http://sesvxace.files.wordpress.com/2014/04/ses-tracer.png[/IMG]
The tracer may be started either through a REPL (such as the SES Console) or from a script call with the following:
Code:
SES::Tracer.start
Code:
SES::Tracer.start do |event, file, line, id, binding, class_name| file.gsub!(/^{\d+}/, SES::Tracer.scripts[$1.to_i]) if file =~ /^{(\d+)}/ printf("%8s %s:%-4d %20s %-20s\n", event, file, line, id, class_name)end
Code:
SES::Tracer.stop
More detailed usage information is available from the source repository where the script is stored.
Script
This script is available from SES VX Ace.
Installation
Place this script below the SES Core (v2.0) script (if you are using it) and all other custom scripts. This script does not require the SES Core (v2.0), but it is recommended.
Credit and Thanks
- Solistra
- Enelvon
This script is made available under the terms of the MIT Expat license. View this page for more information.