Displays the script's variables: their names and current contents.



This function is equivalent to selecting the "View->Variables" menu item in the main window. It can help you debug a script.

For each variable in the list, the variable's name and contents are shown, along with other information depending on what the variable contains. Each item is terminated with a carriage return and newline (`r`n), but may span multiple lines if the variable contains `r`n.

List items may take the following forms (where words in italics are placeholders):

VarName[Length of Capacity]: String
VarName: TypeName object {Info}

Capacity is the variable's current capacity measured in characters, not bytes.

String is the first 60 characters of the variable's contents.

Info depends on the type of object, but is currently very limited.

If ListVars is used inside a function, the function's local variables will be listed first (above the script's global variables).

Known limitation: If a function (or the list of global variables itself) contains more than 10,000 variables, ListVars might not show them in exact alphabetical order; that is, some might be missing from the display.


KeyHistory, ListHotkeys, ListLines

The DebugVars script can be used to inspect and change the contents of variables and objects.


var1 := "foo"
var2 := "bar"
obj := []