The debug.setNonUserCodeExceptions property determines whether any try-catch blocks in this scope are to be treated by the debugger as user-unhandled. Exceptions can be classified as thrown, user-unhandled or unhandled.


Debug.setNonUserCodeExceptions [= bool];


If this property is set to true in a given scope, the debugger can then determine to take some action (for example, break) on exceptions thrown inside that scope if the developer wishes to break on user-unhandled exceptions. If this property is set to false is the same as if the property was never set.

For more information on debugging, see Active Script Debugging Overview.


The following code shows how to set this property.

(function () {  
    Debug.setNonUserCodeExceptions = true;  
        var x = null;  
    } catch (e) {  
    // Catch the exception.  


Supported in the following document modes: Internet Explorer 10 standards and Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1).
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards.

See also

Document Tags and Contributors

Contributors to this page: brdjns, khorne3, erikadoyle
Last updated by: brdjns,