Desktop User Guides > Professional > Using UNICOM Intelligence Professional > Debugging mrScriptBasic code
 
Debugging mrScriptBasic code
UNICOM Intelligence Professional has a number of features to help you identify and correct bugs (errors) in your mrScriptBasic code. You can debug mrScriptBasic script (.mrs) files, the routing sections of interview script (.mdd) files, and the Event section of data management script (.dms) files. Other sections in a .dms file are not suitable for debugging because they are properties sections and do not contain mrScriptBasic code.
There are two main categories of bugs:
Syntax errors
These are improperly formed statements that do not conform to the rules of the scripting language. Syntax errors include spelling and typographical errors, and are generally caught when parsing the script before executing it. For more information, see Syntax errors.
Semantic errors
These occur when the syntax is correct, but the semantics or meaning are not what you intended. Semantic errors might not be caught during the parsing stage, but cause the script to execute improperly. Semantic errors might cause the script to crash, hang, or produce an unintended result when executed.
When a script is not producing the results that you expect, it usually means that there is a semantic error. To track this type of error, use these features:
Stepping through the code
Setting breakpoints
Examining the values of variables
Showing line numbers
See also
Syntax errors
Using UNICOM Intelligence Professional