michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * For use by consumers in scripted languages (JavaScript, Java, Python, michael@0: * Perl, ...). michael@0: * michael@0: * @note C/C++ consumers who are planning to use the nsIDebug interface with michael@0: * the "@mozilla.org/xpcom;1" contract should use NS_DebugBreak from xpcom michael@0: * glue instead. michael@0: * michael@0: */ michael@0: michael@0: [scriptable, uuid(3bf0c3d7-3bd9-4cf2-a971-33572c503e1e)] michael@0: interface nsIDebug : nsISupports michael@0: { michael@0: /** michael@0: * Show an assertion and trigger nsIDebug.break(). michael@0: * michael@0: * @param aStr assertion message michael@0: * @param aExpr expression that failed michael@0: * @param aFile file containing assertion michael@0: * @param aLine line number of assertion michael@0: * michael@0: */ michael@0: void assertion(in string aStr, michael@0: in string aExpr, michael@0: in string aFile, michael@0: in long aLine); michael@0: michael@0: /** michael@0: * Show a warning. michael@0: * michael@0: * @param aStr warning message michael@0: * @param aFile file containing assertion michael@0: * @param aLine line number of assertion michael@0: */ michael@0: void warning(in string aStr, michael@0: in string aFile, michael@0: in long aLine); michael@0: michael@0: /** michael@0: * Request to break into a debugger. michael@0: * michael@0: * @param aFile file containing break request michael@0: * @param aLine line number of break request michael@0: */ michael@0: void break(in string aFile, michael@0: in long aLine); michael@0: michael@0: /** michael@0: * Request the process to trigger a fatal abort. michael@0: * michael@0: * @param aFile file containing abort request michael@0: * @param aLine line number of abort request michael@0: */ michael@0: void abort(in string aFile, michael@0: in long aLine); michael@0: }; michael@0: