The Wayback Machine - https://web.archive.org/web/20160413063815/https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Statements/debugger

Account creation on MDN is disabled while we upgrade our moderation mechanisms. If you see something that needs to be fixed, please file a bug: https://bugzilla.mozilla.org/form.doc and we'll handle it as soon as we can. Thanks for your patience!

debugger

この記事は編集レビューを必要としています。

この翻訳は不完全です。英語から この記事を翻訳 してください。

debugger statementは、ブレークポイントの設定のような任意の利用可能なデバッグ機能を呼び出します。デバッグ機能が利用可能ではない場合、このステートメントは効果がありません。

構文

debugger;

次の例では、関数が呼び出されるときに、(存在している場合)デバッガを呼び出すために、debugger statementが挿入されるコードを示します。

function potentiallyBuggyCode() {
    debugger;
    // do potentially buggy stuff to examine, step through, etc.
}

デバッガが呼び出されるとき、実行は、debugger statementで停止します。それは、スクリプトソースでのブレークポイントのようです。

Paused at a debugger statement.

仕様

仕様 ステータス コメント
ECMAScript第1版 標準 初期定義。
ECMAScript 5.1 (ECMA-262)
The definition of 'Debugger statement' in that specification.
Standard  
ECMAScript 6 (ECMA-262)
The definition of 'Debugger statement' in that specification.
勧告候補  

ブラウザ実装状況

機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari
基本サポート (有) (有) (有) (有) (有)
機能 Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
基本サポート (有) (有) (有) (有) (有) (有)

関連情報

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: shide55
 最終更新者: shide55,
HTTPS · web.archive.org
← Home