PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Windows of exceptions and errors
  • Processing exceptions by programming
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
dbgSaveDebugDump (Function)
In French: dbgSauveDumpDébogage
Saves a debugging dump of the application. A debugging dump is used to reposition "later" the debugger on the runtime information of the application when the function was called. This allows you to view the stack and the content of variables when opening the dump file generated in WINDEV, WEBDEV and WINDEV Mobile.
To read the debugging dump, you must:
  • Drag and Drop the ".wdump" file to the window editor or page editor (on the bar of opened documents for example).
  • open the ".wdump" file directly ("File .. Open").open the ".wdump" file directly (on the "Home" pane, in the "General" tab, expand "Open" and select "Open").
Notes:
  • To view the debugging dump, the current project in the editor must be the project of the application or the project of one of the components used by the application. Only the information regarding the current project will be displayed.
  • Unlike the memory dump, the debugging dump is used to view the content of the memory and the content of the variables during the call to the function.
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
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Saves the debugging dump in the current runtime audit
dbgSaveDebugDump()
// Saves the debugging dump in a file
dbgSaveDebugDump(fExeDir() + ["\"] + "MyDump.wdump")
Syntax

Saving the debugging dump in the current dynamic audit

dbgSaveDebugDump()
Note: This syntax saves the memory dump in the dynamic audit file if the audit is enabled (dbgEnableAudit). The function has no effect if the dynamic audit is not enabled. The audit can be enabled by dbgEnableAudit.

Saving the debugging dump in a file Hide the details

dbgSaveDebugDump(<Name of Dump File>)
<Name of Dump File>: Character string (with quotes)
Name of the file where the dump is saved. The name of the file can be built with 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 debugging dump (YYYYMMDD format).
[%Time%]Start time of debugging dump (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.
If this parameter corresponds to an empty string (""):
  • The extension of the file will be ".wdump".
  • before version 180062: the name of the created file corresponds to: "[%ExeDir%][%ExeName%]_[%Date%]_[%Time%]".
    For example: "C:\MyApp\MyApp_20091023_130812.wdump".
  • from version 180062: the name of the created file corresponds to: "[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]".
    For example: "C:\Users\Doc\AppData\Roaming\WinDev Applications\MyApp\MyApp_20091023_130812.wdump".
If this parameter corresponds to an empty string (""):
  • The extension of the file will be ".wdump".
  • the name of the created file corresponds to: "[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]".
    For example: "C:\Users\Doc\AppData\Roaming\WinDev Applications\MyApp\MyApp_20091023_130812.wdump".
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:
dbgSaveDebugDump("[%UserDataDir%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgSaveDebugDump(-%"[%UserDataDir%][%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:
dbgSaveDebugDump("[%UserDataDir%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgSaveDebugDump(-%"[%UserDataDir%][%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:
dbgSaveDebugDump("[%UserDataDir%][%exeName%]_[%Date%]_[%Time%]")
becomes
dbgSaveDebugDump(-%"[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]")
Remarks

Windows of exceptions and errors

The windows of exceptions and errors propose an option that is used to save a debugging dump when the exception or the error occurs. It is the following link:
"Save the information for the application provider (debugging dump)"

Processing exceptions by programming

dbgSaveDebugDump called from the process code of an exception saves the dump of the status at the time of the exception and not the dump of the current status in the exception process.
To save the status when the exception occurs, dbgSaveDebugDump must be called from the exception process directly.
If dbgSaveDebugDump is used from a procedure (or method) called in the exception process, the status saved will be the one of the current process: the stack will no longer correspond to the exception.
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