nsIDebug 编辑
xpcom/base/nsIDebug.idl
Scriptable Provides debugging support for scripted languages, such as JavaScript, Java, Python, Perl, and so forth. Inherits from: nsISupports
Last changed in Gecko 1.7Note: 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论