jrfonseca / drmingw

Postmortem debugging tools for MinGW.
GNU Lesser General Public License v2.1
273 stars 53 forks source link

Save the result automatically #84

Closed liuwb2001 closed 1 year ago

liuwb2001 commented 1 year ago

It is a useful tool to debug. But when I want to use it on a Windows server, I need it to save the debug info automatically without bundling exchndl to my program. I am wondering how to achieve it.

jrfonseca commented 1 year ago

I didn't quite get want you're looking for. You'll need to be more specific.

liuwb2001 commented 1 year ago

My question is how to use Drmingw to automatically save captured information to a file, instead of having to manually export the file in the window. Thank you.

jrfonseca commented 1 year ago

For that I recommend using catchsegv .

For example, instead of running

yourapp.exe

run

catchsegv.exe -w -- yourapp.exe

One can also redirect the stderr output to a file, as

catchsegv.exe -w -- yourapp.exe >> yourapp.log 2>&1

but probably the best thing is to have some sort of wrapper PowerShell script that writes logs somewhere with a timestamp.