Besides using the event window for sending debug messages during a Script execution, Scripts can be also debugged by using external tools like a Visual Studio (VS) environment.
In order to debug with an external tool, please follow the following steps:
In the Scripts form, press the debug
icon (). The
Scripts that are selected are generated with debug information.
Load the Script file (.CS) into Visual Studio and set breakpoints.
If running outside VS, the user can attach the Script to the Perytons™ Protocol Analyzer process when it starts or write the following code in the Script:
System.Diagnostics.Debugger.Break();
When this line is executed, the user will be prompted to start a debugger. After choosing a debugger (there are several options listed) the debugger will start and will bring up the code that caused the break.