This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Debug functions
  • Operating mode of the runtime log
  • Miscellaneous
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
dbgEnableLog (Function)
In french: dbgActiveLog
Enables the runtime log programmatically.
Remark: Starting with version 28, the runtime log contains a ".wxl" file, a ".ndx" file and a ".mmo" file. If the project corresponding to the runtime log is opened in the editor, the log file can be directly opened in the editor:
  • on the "Home" tab, in the "General" group, expand "Open", select "Open", and then select the desired ".wxl" file.
  • drag the ".wxl" file from the file explorer and drop it onto the editor.
For more details, see Runtime log.
Note: In previous versions, the runtime log was a ".wlog" file.
// Active le log d'exécution par défaut
<Result> = dbgEnableLog([<Log file> [, <Options> [, <delay before recycling>]]])
<Result>: Boolean
  • True if the runtime log was started,
  • False otherwise.
<Log file>: Optional character string
Location and name of the log file to create. The name and location of the log 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 runtime log (YYYYMMDD format).
    [%Time%]Start time of runtime log (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 name of the Log file corresponds to:
For example:
"C:\Users\Doc\AppData\Roaming\WINDEV Applications\MyApp\Myapp_20071023_130812.wlog".
Caution: If you build strings dynamically ("Allow '[% %]' in the strings" option in the "Compilation" tab of the project description, a compilation error appears (unknown identifier). In this case, each string must be preceded by '-%'. Example:
<Options>: Optional Integer constant (or combination of constants)
Used to configure the options of the runtime log:
LogAllThe runtime log retrieves:
  • the WLanguage functions
  • the parameters of the functions
  • processes
LogEnabledThe runtime log is immediately enabled.
LogParametersThe parameters of the functions are written into the runtime log.
LogPauseThe runtime log is not immediately enabled
LogProcessOnlyThe runtime log only retrieves information about the processes.
LogWLanguageFunctionsThe WLanguage functions are written into the runtime log.

The combination LogEnabled + LogWLanguageFunctions is used by default if this parameter is not specified.
<delay before recycling>: Optional duration
New in version 2024
delay (in seconds) before deleting old log information to limit file size. If this parameter is not specified, old log information is not deleted..

Operating mode of the runtime log

  • dbgEnableLog must be called only once. Any other call to this function will have no effect.
  • To temporarily enable or disable the runtime log, use dbgLogStatus.
  • To modify the options of the runtime log, use dbgLogOption.
WINDEV Remark: The runtime log can also be started via the ".wx" file found beside the executable. For more details, see Runtime log.


  • dbgEnableLog can be used in a REST web service.
  • You can define any location for the log file. In this case, keep in mind there may be permission-related issues.
    Reminder: Generally, the data directory is accessible in write mode.
Component: wd290vm.dll
Minimum version required
  • Version 12
This page is also available for…
Click [Add] to post a comment

Last update: 03/27/2024

Send a report | Local help