The
Debug item is the text display, 1 text string to 1 row. The
Pm.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 in the "
INFO system settings" configuration window.
This method is functional also in
Macro expression $.expr and in the
onDraw event of the
PmgCanvas object.
This method is also functional in
Web panels. If the method is called in in events of the
Web panel, there are following limitations:
- The nAttr parameter is not taken into consideration
- The text is not written into the
INFO system on the server, but is stored on the Web client. Debug texts can be displayed on the client side for debug purposes:
- if
Shift+Ctrl+Alt+space keys is pressed in the
Web panel
- or in the Web browser console (by the F12 key open the "Developer tools" window and select the Console tab)
If in the
Application.ini file in the
[Log] section the
EnableDebug item is set, then the text is also written into the
Application.log file.
The advantage of such approach is the accessibility of such logs even if the application is not running.
More general way of writing items into the
INFO system: see the methods
Pm.InfoLogReg and
Pm.InfoLogAdd.