SES Debugger v1.2
by Solistra
Introductionby Solistra
This script provides a simple debugger with break point functionality using the SES Console. Essentially, you establish a series of break points on specific lines within scripts in the Ace Script Editor — when the line is encountered, execution stops and the SES Console is opened with the active class at the time of the break as the context. This is primarily a scripter’s tool.
Change Log
- v1.2 (April 18th, 2014) - Removed Tracer dependency, bug fixes.
- v1.1 (April 14th, 2014) - Fix potential encoding errors.
- v1.0 (April 11th, 2014) - Initial release.
- Dynamic setting of break points in code execution.
- Displays code surrounding the break point when encountered.
- Console context is automatically set to the object which triggered the break point.
- Iterates over defined break points until stopped.
[IMG]http://sesvxace.files.wordpress.com/2014/04/ses-debugger.png[/IMG]
The debugger may be started by pressing F6 (by default -- this is able to be configured in the configuration area) or by explicitly starting it through the SES Console or a script call:
Code:
SES::Debugger.start
You may stop the debugger at any time while it is running by entering the following either through the SES Console or a script call:
Code:
SES::Debugger.stop
For example, let's assume that we want to break every time Scene_Base is told to update. In order to set up that break point, we could do one of two things (depending on when we need the break point set): we can either include the break point in the configuration area of the script, or we can set the point dynamically at some point during the game's execution (either through a REPL -- such as the console -- or a script call). The following examples demonstrate both methods:
Code:
# Configuration area.@breakpoints = { 'Scene_Base' => [40],}# Dynamically adding the break point.SES::Debugger.breakpoints['Scene_Base'] = [40]
Code:
SES::Debugger.breakpoints['Scene_Base'].push(46)
This script is available from SES VX Ace.
Installation
This script requires the SES Core (v2.0), and Console (v1.0) scripts in order to function.
Place this script below Materials, but above Main. Place this script below the SES Core and SES Console, but above other custom scripts.
Credit and Thanks
- Solistra
This script is made available under the terms of the MIT Expat license. View this page for more information.