I'm developing a C++ software product for Windows. I wrote tests for it using the Catch2 framework. They are automated in CI/CD pipeline in Azure Dev Ops (ADO). What I would like to do is to get a crash dump (.dmp file) automatically created and saved in this ADO pipeline, when there is a crash in my code (eg unhandled exception). I don't see anything in Catch2 framework to allow crash dump collection. I'm using the tool procdump.exe elsewhere to create crash dump, and I'm wondering if there is a way to run this tool with my Catch2 tests to get a dump when a crash happens. Any tips on how that can be done, or using other tools, will be helpful, thanks! Darren
I ended up using procdump.exe to launch my Catch2 test executable. For example:
procdump.exe -ma -e -x CrashDumpFolder MyCatch2Tests.exe <test arguments>
Since in my case MyCatch2Tests.exe runs the tests in a single process, the above should work. If I have a crash in my tests a full crash dump (*.dmp file) will be created in the CrashDumpFolder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.