AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de depuración
  • Operating mode of dynamic audit
  • Miscellaneous
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Enables the dynamic audit programmatically.
The dynamic audit report is a ".waudit" file containing erroneous or abnormal behavior, 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 dynamic auditing project is open in the editor, the audit file can be opened directly in the editor:
  • on the "Inicio" tab, in the "General" group, expand "Abrir", select "Open" and select the desired ".waudit" file.
  • drag and drop the ".waudit" file from the file explorer to the editor.
Ejemplo
// Enables the dynamic audit with all the options enabled
dbgEnableAudit()
Sintaxis
<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 and location of the audit file can be:
  • fully customized.
  • built using the following keywords:
    [%ExeDir%]Directory of the 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 the current user.
    [%ComputerName%]Computer name.
    [%DataDir%]Directory of the HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of fDataDir.
    [%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".
  • the name of the audit file is: "[%RepDonneesUtilisateur%][%NomExe%]_[%Date%]_[%Heure%]".
    For example: "C:\Users\Doc\AppData\Roaming\Applications WINDEV\MyAppli\MyAppli_20071023_130812.waudit".
Warning: If you use dynamic string construction (option "Allow "[% %]" in strings" in the "Compilation" tab of the project description, a compilation error appears (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:
AuditAll
(Default value)
All the audit events are written into the dynamic audit.
AuditAssertionThe assertions are written into the dynamic audit.
AuditCommentThe audit comments are written into the dynamic audit. An audit comment is written by dbgWriteCommentAudit.
AuditEnabledThe dynamic audit is immediately enabled.
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.
AuditWarningAnomalyThe execution warnings regarding the detected anomalies are written into the dynamic audit.
AuditWarningPerformanceThe execution warnings regarding performance are registered in the dynamic audit.
AuditWarningUserThe custom execution warnings are written into the dynamic audit. A custom warning is triggered by dbgWriteWarningAudit.
Observaciones

Operating mode of dynamic audit

  • dbgEnableAudit must be called only once. 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.
WINDEV Note Dynamic auditing can also be started using the ".wx" file next to the. For more details, see Dynamic audit.

Miscellaneous

  • dbgEnableAudit can be used in a REST web service.
  • You can define any location for the audit file. In this case, keep in mind there may be permission-related issues.
    Reminder: The data directory is normally always writable.
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 15
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

Señalar un error o enviar una sugerencia | Ayuda local