Explore Categories



Expression Diagnostics

This will help the developers to debug the TDL Program much faster by evaluating the complex expressions and logging the values evaluated at every stage. In other words, this feature would provide the breakup of the expression, the result of each sub-expression, as well as the expression which has failed to evaluate.

The steps to get the Expression Diagnostics information are:

  • Start the Expression Diagnostics
  • Execute the desired Report
  • Dump the information and/or Stop the Expression Diagnostics with the file name.

The dumped debugger information, when opened in Textpad , is as shown below:

As seen in the figure, each expression in the developer’s code, as well as the default codes are evaluated and the result values are shown for the purpose of debugging. If any expression evaluation fails, the Result would display as Failed.

Commands Used for Expression Diagnostics

The Calculator pane  commands used for Expression Diagnostics are as follows:

Debugger Mode

This sets the mode to Debug, which means that any Debugging Commands will be accepted. It provides certain calculator pane commands in the hands of the developer in order to diagnose the errors in the code, as well as to evaluate and/or set the values to the environment variable.


MODE: Debug

Once mode is set to Debug, commands issued in the Calculator Pane will work in Debug Context.


Start command is used to start diagnosing the data. Subsequent to issuing this command, when any report is viewed, the data will start gathering every expression along with their values, and will be updated in the log file later.




This command dumps the collected Expressions data to the file tdldebug.log . It also clears the memory.




This command is used to check the status of the debugger and returns the statement Expression Debugger is ON or Expression Debugger is OFF.




This calculator pane command is used for evaluating an expression.


EVAL : ##SVFromDate

In this example , the value of SVFromDate will be returned in the Calculator Pane.


A variable value can also be set from within a Calculator Pane. This feature helps the developer to set the variable value in the Calculator Pane itself and check the behavioural change. This will speed up the testing process of the Developer by not requiring him to write the code, create an interface element to alter the variable values, and then check the same.


SET : DSPShowOpening : Yes

This will set the value of the variable DSPShowOpening . For instance, prior to viewing Trial Balance, one can set the value of this variable in the Calculator Pane and the Trial Balance will be displayed with the Opening Column.


Print displays the value of a system variable.


Print : SVFromDate

This will return the SVFromDate value.


This command is used to clear the existing diagnosis data from Me m ory .




This command will stop further diagnosis of d a ta.




This gives the list of Debug commands, with a description of their purpose.



Actions Used for Expression Diagnostics

Apart from Calculator Pane Commands, there are several TDL Actions provided to programmatically execute the debugging operations. They are:

Action – Start Debug

This action is used to start debugging. All expressions evaluated would be debugged. The information collected can be dumped to a file anytime.


Start Debug


[Button : Start Debugging]

Key : Alt + D

Action : Start Debug : “Debugged @ ” + @@SystemCurrentTime

Action – Dump Debug

This action is used to dump all debugging information to the file. It also clears the diagnosis data from the memory, once dumped.


Dump Debug: <File Name>


<File Name> is the name of the file to which the information has to be written.


[Button : Dump Debugging]

Key : Alt + E

Action : Dump Debug : “Debugged @ ” + @@SystemCurrentTime

Action – Stop Debug

This action is used to stop debugging. If the file name is passed, then the information is also dumped into the specified file.


Stop Debug [: <File Name>]


<File Name> is the name of the file to which the information has to be written.


[Button: Stop Debugging]

Key : Alt + O

Action : Stop Debug : “Debugged @ ” + @@SystemCurrentTime

Functions used for Expression Diagnostics

The following function has been introduced to support Debugging operations:

Function – $$IsDebuggerOn

This function is used to check the current status of the Expression Debugger. It returns logical value TRUE if the status of the Debugger is ON.




Inactive : NOT $$IsDebugger On

Post a Comment

Is this information useful?