KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Variable Types In The Debugger
PRODUCT: 4D | VERSION: 14.x | PLATFORM: Mac & Win
Published On: January 14, 2016

In the 4D Debugger it is possible to display the type of a Variable in the Expression Pane. This is done by right clicking the expression pane and toggling the "Show Types" option in the pop up menu shown below.



When this option is set, the expression pane will add append a colon and the variable type to the right of the expression if it is a variable shown below.



This is can be very helpful in debugging, such as times when a memory error is seen, it may be due to simple errors such as incorrectly sizing variables of an alpha type or array. Below is an image where one variable is of an Alpha type but has a size of 19 while the other has a size of 255. Performing an assignment of $varA:=$varB may work in cases where $varB's contents are smaller than 20, but if the size should be greater than 19 a memory error will be prompted.



Another scenario that this can be helpful with debugging is when a variable unkowningly gets reassigned to a different type which can cause errors when assuming it hasn't been reassigned.