PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Operating mode of dynamic audit
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
dbgEnableAudit (Function)
In French: dbgActiveAudit
Enables the dynamic audit by programming.
The report of the dynamic audit is a ".waudit" file containing the invalid or abnormal behaviors, the time-consuming operations, ... For example:
  • the assertions (even if they are not active).
  • the non-fatal errors not processed.
  • the fatal errors (exceptions), regardless they are processed by WHEN EXCEPTION or not.
  • the execution warnings regarding the anomalies of the project (exceeding the capacity of a variable, ...).
  • the execution warnings regarding the performance problems (resources found on a network and not found, ...).
  • the custom execution comments and warnings.
Note: If the project corresponding to the dynamic audit is opened in the editor, the audit file can be directly opened in the editor:
  • via "File .. Open" and by selecting the requested ".waudit" file.on the "Home" pane, in the "General" group, expand "Open", select "Open" and select the requested ".waudit" file.
  • by performing a Drag and Drop of ".waudit" file from the file explorer to the editor.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Enables the dynamic audit with all the options enabled
dbgEnableAudit()
Syntax
<Result> = dbgEnableAudit([<Name of Audit File> [, <Options>]])
<Result>: Boolean
  • True if the dynamic audit was started,
  • False otherwise.
<Name of Audit File>: Optional character string
Location and name of the audit file to create. The name of the audit file can be built from the following elements:
[%ExeDir%]Directory of executable, always filled with the "\" character. This directory is equivalent to the result of fExeDir.
[%ExeName%]Executable name.
[%Date%]Start date of the runtime audit (YYYYMMDD format).
[%Time%]Start time of runtime audit (HHMMSS format).
[%UserName%]Name of current user.
[%ComputerName%]Computer name.
Versions 18 and later
[%DataDir%]
New in version 18
[%DataDir%]
[%DataDir%]
Directory of HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of fDataDir.
Versions 18 and later
[%DirUserData%]
New in version 18
[%DirUserData%]
[%DirUserData%]
Directory for the data of the current user of the current application. This directory is equivalent to the result of fDataDirUser.
By default:
  • the extension of the audit file is ".wdaudit".
  • before version 180062: the name of the audit file corresponds to: "[%ExeDir%][%ExeName%]_[%Date%]_[%Time%]".
    For example: "C:\MyApp\MyApp_20071023_130812.waudit".
  • from version 180062: the name of the audit file corresponds to: "[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]".
    For example: "C:\Users\Doc\AppData\Roaming\WinDev Applications\MyApp\MyApp_20071023_130812.waudit".
By default:
  • the extension of the audit file is ".wdaudit".
  • the name of the audit file corresponds to: "[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]".
    For example: "C:\Users\Doc\AppData\Roaming\WinDev Applications\MyApp\MyApp_20071023_130812.waudit".
Versions 22 and later
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableAudit("[%DirUserData%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgEnableAudit(-%"[%DirUserData%][%ExeName%]_[%Date%]_[%Time%]")
New in version 22
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableAudit("[%DirUserData%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgEnableAudit(-%"[%DirUserData%][%ExeName%]_[%Date%]_[%Time%]")
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
dbgEnableAudit("[%DirUserData%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgEnableAudit(-%"[%DirUserData%][%ExeName%]_[%Date%]_[%Time%]")
<Options>: Optional Integer constant (or combination of constants)
Used to configure the options of the dynamic audit:
AuditEnabledThe dynamic audit is immediately enabled.
AuditAssertionThe assertions are written into the dynamic audit.
AuditCommentThe audit comments are written into the dynamic audit. An audit comment is written by dbgWriteCommentAudit.
AuditErrorThe non-fatal errors not processed are written into the dynamic audit.
AuditExceptionThe fatal errors, processed by WHEN EXCEPTION or not processed, are written into the dynamic audit.
AuditPauseThe dynamic audit is initialized but it is not immediately enabled. It can be enabled thereafter by dbgAuditStatus.
AuditAll
(Default value)
All the audit events are written into the dynamic audit.
AuditWarningAnomalyThe execution warnings regarding the detected anomalies are written into the dynamic audit.
AuditWarningPerformanceThe execution warnings regarding the performances are written into the dynamic audit.
AuditWarningUserThe custom execution warnings are written into the dynamic audit. A custom warning is triggered by dbgWriteWarningAudit.
Remarks

Operating mode of dynamic audit

  • dbgEnableAudit must be called once only. Any other call to this function will have no effect.
  • To temporarily enable or disable the dynamic audit, use dbgAuditStatus.
  • To modify the options of the dynamic audit, use dbgAuditOption.
WINDEVWindows Mobile Note:
The dynamic audit can also be started via the ".wx" file found beside the executable. See Dynamic audit for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Linux wd230vm.so
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment