// Save the dump file in the current runtime audit
dbgSaveDebugDump()
// Save the dump file in a file
dbgSaveDebugDump(fExeDir() + ["\"] + "MyDump.wdump")
Syntax
Saving the dump file in the current dynamic audit
dbgSaveDebugDump()
Remark: 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 dump file in a file Hide the details
dbgSaveDebugDump(<Name of dump file>)
<Name of dump file>: Character string
Name of the file where the dump is saved. The name of the file can be built with the following elements: | |
[%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 dump file (YYYYMMDD format). |
[%Time%] | Start time of the dump file (HHMMSS format). |
[%UserName%] | Name of the current user. |
[%ComputerName%] | Computer name. |
Versions 18 and later[%DataDir%] New in version 18[%DataDir%] [%DataDir%] | Directory of the 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".
- 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 laterCaution: If you use dynamic string construction ("Allow "[% %]" in strings" in the "Compilation" tab of the 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 22Caution: If you use dynamic string construction ("Allow "[% %]" in strings" in the "Compilation" tab of the 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 use dynamic string construction ("Allow "[% %]" in strings" in the "Compilation" tab of the 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 dump file when the exception or the error occurs. It is the following link:
"Save the information for the application provider (dump file)"
Handling exceptions programmatically
When called from an exception handling code, dbgSaveDebugDump saves the dump file at the time the exception occurred, and not the current dump file in the exception process.
To save the status at the time of the exception, call dbgSaveDebugDump directly from the exception process.
If you use dbgSaveDebugDump 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.