Automatically Handle Failed Asserts in Debug Builds

As of 2004-12-8, it is now possible to automatically handle failed asserts in debug builds of Mozilla for Windows.

The handler receives the assert string, and sequentially attempts to match each word in the string (left to right) to registry DWORD names from HKLM\Software\\windbgdlg and HKCU\Software\\windbgdlg. At the first match, it will take the action specified by the DWORD's value.

The valid values are:

  • 0x5 Automatically ignore
  • 0x4 Automatically retry
  • 0x3 Automatically abort

Note that you can also force windbgdlg to prompt, by setting a value of 0xfffffffe.

To "comment out" a value, set its value to 0xffffffff.

As an example, consider the following failed assertion:

ASSERTION: no document: 'mDocument != nsnull', file
d:/cvs-1.11.4/mozilla/content/xul/content/src/nsXULElement.cpp, line 

(note that I have my source tree in d:/cvs-1.11.4/mozilla)

If you have a DWORD in HKCU\Software\\windbgdlg\ named "d:/cvs-1.11.5/mozilla/content/xul/content/src/nsXULElement.cpp," (WITH the comma - matches are whole-word only) and value 0x5, the assert would automatically be ignored. If you also had a DWORD named "3173", it would have no effect here because the handler stops comparing values at the first match.

Note that double quotes which delimit an item (") are ignored in value names and the assertion string, so "silly" and silly will both be matched by a value named silly. "silly", will only be matched by a value named "silly", since the quotes are internal to the string.

Document Tags and Contributors

 Contributors to this page: teoli, Davidwboswell
 Last updated by: Davidwboswell,