"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "docs/script_guide/debugging_tips.html" of archive TestMaker.zip:


Caution: In this restricted "SfR Fresh" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.

Some tips on debugging agent scripts:

The TestMaker scripting language supports several handy functions when debugging problems in script files. The dir(), vars(), globals() and locals() functions give insight into the variables and functions in use within your scripts.

print dir() will display a list of names in the defined in the current scope. Additionally, dir(object_name) will list the names defined in the object specified.

print vars( object_name ) will display a dictionary of bound names with the specified object. The vars function only works on objects with a __dict__ attribute, which is all Java objects and most functions.

print globals() prints a dictionary like object representing the variables defined in the global namespace.

print locals() does the same but for the local namespace.