Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

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\mozilla.org\windbgdlg and HKCU\Software\mozilla.org\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 
3173

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

If you have a DWORD in HKCU\Software\mozilla.org\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,