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.

nsIDebug

Provides debugging support for scripted languages, such as JavaScript, Java, Python, Perl, and so forth.
Inherits from: nsISupports Last changed in Gecko 1.7

Note: C/C++ consumers who are planning to use the nsIDebug interface with the @mozilla.org/xpcom;1 contract should use NS_DebugBreak() from XPCOM glue instead, or alternatively the NS_ABORT, NS_ASSERTION, NS_BREAK, and NS_WARNING macros, which also call NS_DebugBreak() if used in a debugging build.

Method overview

void abort(in string aFile, in long aLine);
void assertion(in string aStr, in string aExpr, in string aFile, in long aLine);
void break(in string aFile, in long aLine);
void warning(in string aStr, in string aFile, in long aLine);

Methods

abort()

Requests the process to trigger a fatal abort.

void abort(
  in string aFile,
  in long aLine
);
Parameters
aFile
File containing abort request.
aLine
Line number of abort request.

assertion()

Shows an assertion and triggers optional behavior based on the XPCOM_DEBUG_BREAK environment variable, defaulting to calling break() on Windows and OS/2 and warning on other platforms.

void assertion(
  in string aStr,
  in string aExpr,
  in string aFile,
  in long aLine
);
Parameters
aStr
assertion message.
aExpr
Expression that failed.
aFile
File containing assertion.
aLine
Line number of assertion.

break()

Requests the software break into a debugger. If no debugger is running then this usually results in a program crash. However, on Windows a dialog is first presented giving the user the option of aborting, breaking, or ignoring the request. The dialog can be suppressed by use of the windbgdlg registry key. This allows the debugger to be attached before the software break.

void break(
  in string aFile,
  in long aLine
);
Parameters
aFile
File containing break request.
aLine
Line number of break request.

warning()

Shows a warning.

void warning(
  in string aStr,
  in string aFile,
  in long aLine
);
Parameters
aStr
warning message.
aFile
File containing warning.
aLine
Line number of warning.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, Neil, trevorh
 Last updated by: Sheppy,