Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Debug - method of object Pm

Description:
Text dump into the Debug_info item of the INFO system
Syntax:
Debug(vValue As Variant, [nAttr As Variant])
Calling:
Pm.Debug sValue, nAttr
Parameters:
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.
Note:
The Debug_info 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 setup.
 
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] the EnableDebug 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.
Example1:
Text dump into the "Debug1" page:
Pm.Debug "The algorithm is executed in the time:" & Now
Example2:
Dump of detailed information about the arr variable into the "Debug2" page:
Dim arr
arr = Array("hello", 333, 3.14)
Pm.Debug arr, 1+2
Navigation:
 
- Pm
 
- Abs
- Cos
- Debug
 
 
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice