How to reactivate Windows Error Reporting for my application (cpp)? (Windows 10)

707 Views Asked by At

TLDR

When one of my applications executes _CrtDbgBreak() it just writes a .dmp file and exits. On any other application _CrtDbgBreak() causes the app.exe has stopped working -dialog where I can chose to break into my debugger (VS 2013).

This is my desired behavior.

Background

A few weeks ago I experimented with Windows Error Reporting to find out if/how the WER Dialog could be suppressed. Apparently I succeeded for my application and unfortunately I haven't found the way how to undo this.

In the meantime I have had to deal with a number of other things so that I no longer remember which steps I exactly took at the time. (Should have taken notes, I know.) Since it works for other applications, I am guessing a setting specific to my app needs to be reset.

I turned to the usual suspects on my machine but so far I haven't found anything:

  • HKCU\Software\Microsoft\Windows\Windows Error Reporting
  • HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting
  • Policy Editor: Computer Configuration\Administrative Templates\Windows Components\Windows Error Reporting
  • Policy Editor: User Configuration\Administrative Templates\Windows Components\Windows Error Reporting
  • WER Service is running

I have even removed all occurrences of my executable's name from my entire registry but this hasn't made any difference. What else am I missing?

2

There are 2 best solutions below

3
shnara On

One possible reason is your app/exe is added to the WER's exclusion list. See 'ExcludedApplications' at https://learn.microsoft.com/en-us/windows/desktop/wer/wer-settings.

https://learn.microsoft.com/en-us/windows/desktop/api/Werapi/nf-werapi-weraddexcludedapplication

Check registry at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\ExcludedApplications

If your app/exe name is found there, remove it.

0
JeffRSon On

Maybe you'd set the process error mode, like so

SetErrorMode(SEM_NOGPFAULTERRORBOX);

(see https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode)

[yes - the question is dated, but it's not marked as answered, and this alternative solution may help future readers]