Since OpenSees is a script-based finite element analysis software, it can be difficult to debug a model or analysis when problems arise. So, I developed a pause command for Tcl that allows for mid-script query of the model and insertion of code. Additionally, I developed a simple helper command for printing variables. These commands have been instrumental to my OpenSees code development, and, in my opinion, are a must-have if you use Tcl.
The debug.tcl file provides two procedures to help the OpenSees Tcl user: pause and pvar. The pause command pauses a Tcl script and enters command-line mode, allowing the user to query variables and insert code into an analysis. The pvar command prints a variable, such as "a = 5".
The ElasticFrame.tcl file is an OpenSees example that uses the pause and pvar commands.
Files are hosted on my GitHub: https://github.com/ambaker1/public/tree/master/debug