Debug - method of object Pm
Text dump into the Debug_info item of INFO system.
Debug(vValue As Variant, [nAttr As Variant])
|vValue||(Variant) Value that has to be dumped (it can even be 1-dimensional array)|
| nAttr||[optional] (Variant) Attributes how to dump a text. The default value is 0. It can be sum of the following values:|1
- Detailed information about the vValue
is dumped. This information depends on the value of the data type:
- Array - even values of all array items is dumped
- Object - all properties and methods of the object is dumped
- other type - the data type and the value is dumped
2 - Text is dumped into the "Debug2" folder. Otherwise it is dumped into the "Debug1" folder.
item is the text display, 1 text to 1 row. The Debug
method adds to this item one row of text that is in the vValue
parameter. The number of rows doesn't grow to infinity - after reaching the maximum number, the oldest rows are deleted. The maximum number of rows can be set on the page > INFO system settings
The method can also be called in the graphic item events for Web panels
. If the method is called in Web panel, there are following limitations:
- The nAttr parameter is not taken into consideration
- The text is not written to the INFO system on the server, but is stored on the Web client. Debug texts can be displayed on client side for debug purposes when Shift-Ctrl-Alt-space key is pressed in Web panel.
If in the file "Application.ini"
in section [Log]
item is set then the text is also written into the twxt file Application.log
. The advantage of such approach is the accessibility of such logs even if the application is not running.
Text dump into the "Debug1" page:
Pm.Debug "The algorithm is executed in the time:" & Now
Dump of detailed information about the arr variable into the "Debug2" page:
arr = Array("hello", 333, 3.14)