Main Help → GENerel Reference → Dump Command
The Dump command is used to help debugging internal scripts but display information while process commands in the scripting window:
Dump #1,<#2>, ...
where #1, #2, etc. can be
parsed: Display each command as parsed by the codeevaluated: Display each command after evaluating command argumentsoff: Turn off output of debugging linesIf no arguments are provided, it is the same as providing both parsed and evaluated.
For example, consider the following script that has an error and use of a Dump command to find it:
Dump doc.get recs,"individuals" #name="Thornton, Sean" recs.#name.get indi write "name = "&@indi.name&return write "born = "&@indi.borthDate&return
The output of running this script is
[PARSED COMMAND]: doc.get,recs,"individuals"
[EVALUATED COMMAND]: doc.get,recs,individuals
[PARSED COMMAND]: #name,=,"Thornton, Sean"
[EVALUATED COMMAND]: #name,=,Thornton, Sean
[PARSED COMMAND]: recs.#name.get,indi
[EVALUATED COMMAND]: recs.#name.get,indi
[PARSED COMMAND]: write,"name = "&@indi.name&return
[EVALUATED COMMAND]: write,name = Thornton, Sean
name = Thornton, Sean
[PARSED COMMAND]: write,"born = "&@indi.borthDate&return
[EVALUATED COMMAND]: write,born = Expression error
born = Expression error
class INDIRecord does not have requested attribute in line 6:
write "born = "&@indi.borthDate&return
Each parsed command shows how the code split the line into a command and it arguments with each component separated by commas. The evaluated command shows how the code evaluated each argument (but not the command) as an expression. For example, the evaluation of the first command simply evaluated the string expression "individuals" that removes the quotes and returns the plain string. All commands go as expected until the write "born = "&@indi.borthDate&return command. It is parsed correctly, but the evaluation step reveals an expression error. The problem is that the code used borthDate instead of the correct property birthDate.
Errors like the anove example are automatically caught by internal scripting. The Dump command is actually most useful when a script does not have errors but is getting the wrong answer. You can use blocks surrounded by Dump and Dump "off" to see if commands within those blocks are proceding as expected.