Solution
The WinDbg tool can be used to monitor process exception information while an application is running. If a crash, exception, or other severe issue occurs in the application, WinDbg will generate a dump file containing information on the underlying code that is executing at the moment of the problem. This information can be helpful for NI to characterize the problem. The steps below describe the recommended procedure for configuring WinDbg, and how to obtain the dump file.
Installing and using WinDbg
- To obtain the tool, download one of the following installers:
- Execute the installer if SDK downloaded, check only Debugging Tools for Windows.
- Open your application.
- Launch WinDbg, e.g. by
- (on Windows 11) navigating to Start Menu » All Apps » WinDbg Preview
- (on Windows 10) navigating to Start Menu » Programs » Windows Kits » Debugging Tools for Windows » WinDbg.
- (on Windows 7) navigating to Start Menu » All Programs » Debugging Tools for Windows » WinDbg.
Note: Please make sure to use the appropriate version of WinDbg for the software process you are interested in. For example, WinDbg (x86) should be used with LabVIEW 32-bit and WinDbg (x64) should be used with LabVIEW 64-bit.
- In WinDbg, select File » Attach to a Process.
- Select your application's process from the Process List. Selecting Sort » By Executable to alphabetically sort the process list can help finding your process. In case you are running your application in the LabVIEW Development Environment, search and select LabVIEW.exe, Enerchron, or application. Click Attach/OK.
- A command line window will appear in the main WinDbg application. For old Windows Dbg, select Debug » Go, else will start automatically.
- WinDbg is now monitoring the process. At this point, attempt to replicate the crash or exception in your application. Once the behavior occurs, Navigate to the WinDbg application Window.
Note: When WinDbg catches a process exception, your application will appear unresponsive, and will not allow user interaction anymore.
- Create a dump file by typing the following command into the prompt at the bottom of the WinDbg window: .dump /ma C:\[path]\filename.dmp. Use a path you have writing access to, e.g. your local desktop.
- WinDbg will need some time to write the dump file. Check for any error or success message in the WinDbg window afterwards.
- Close WinDbg. This will automatically close your application as well.
The dump file created by WinDbg may be used by NI to further pinpoint the origin of LabVIEW, TestStand, Enerchron, or other NI software process exceptions. As a typical dump file is several hundred MB in size, you cannot attach it to an email to
NI Support. Instead, visit ni.com/ask and upload the file to your support ticket under the files section.