Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using Procdump Through the command line on 4D
Published On: June 21, 2019
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Procdump is a Windows Sysinternals tool that can be used to modify how a dump file is generated. A dump file is a snapshot of the memory "dumped" on to the disk as a .dmp file.

This file is typically useful as a snapshot of the state of the application's memory usage can be very helpful to diagnose an issue sometimes, especially crashes.

Procdump is a command line utility tool, but a user interface was developed to make it a bit easier to use for users who like UI interaction:

The procdump interface has a couple of options that are available to configure that is useful to 4D.
Procdump can still be used without the UI and can be useful in cases which the applicaiton cannot be detected by the UI, such as trying to watch a service.

The suggested format to run Procdump for a 4D application in the command line is
[path to procdump.exe] [when to write dump] -ma [PID] [path to write dump]

For path of procdump.exe:
just enter in the full path to procdump.exe or the path from the current directory. Procdump.exe is provided in the ProcdumpInterface package, but can also be downloaded separaterly from the microsoft page.

For when to write dump:
omit this section to immdiately write a dump
pass "-e" to write a dump when an exception/crash occurs
pass "-h" to write a dump when a hang occurs
pass "-e -h" for both events

Is is suggested to always pass -ma as -ma, will let procdump know that a full dump with maximum information should be generated, this is the reason why Procdump is suggested to be used over the default dump generatation when an application crashes which will typically contain less information.

For PID:
The PID of each process and service can be found in the Task Manager. If the PID is not listed, the column may not be enabled, and should be able to be enabled through the View Menu.

For path to write dump:
This will be where the dump file is written to, it is suggested that the location be a place that does not require special permissions, like the desktop or documents folder.

If the task manager lists some 4D applications as shown:

To run procdump of the first 4D.exe to generate a full dump when 4D crashes call the following in the command prompt:
...\procdump.exe -e -ma 5036 C:\Users\

If the command prompt remains open and displays the last line shown above mentioning that monitoring is occuring then everything if working properly.

Commented by Toshiyuki Yamada on July 3, 2019 at 9:57 PM
Japanese version is available.(日本語版があります。)