breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
breakpoint = function (_name, _context) { if (!breakpoint.allow) { return ; } var expr, result, output; while ( true ) { expr = prompt( 'Debug into breakpoint "' + _name + '"' , '' ); if (!expr) { break ; } else { output = true ; try { result = result = _context(expr); } catch (e) { alert( '[!] caught exception with message "' + e.message + '"' ); output = false ; } if (output) { alert(result); } } } } breakpoint.allow = true ; * This source code was highlighted with Source Code Highlighter .
ここで、ブレークカレントを設定するには、次のように記述する必要があります。
*このソースコードは、 ソースコードハイライターで強調表示されました。
- 関数 f(_a、_b、_c)
- {
- var a = 10;
- var b = 20;
- var c = 30;
- ブレークポイント( "breakpoint1" 、 関数 (_ $){ return eval(_ $);});
- }
- f(40、50、60);
関数function(_ $){return eval(_ $);に注意してください。 }-これは、呼び出し元関数のコンテキストがブレークポイントに渡される方法です。 名前_ $はまれな識別子として使用されます。
このメカニズムは、たとえばIAにfirebugやその他の通常のデバッガーがない場合に役立ちます。 シンプルで上品。 :^)
だまし書きを書いた場合は謝罪します-私にとってこれは新しいアプローチでした。
UPD#1 12/08/09
このようにブレークポイントコードを変更した場合:
*このソースコードは、 ソースコードハイライターで強調表示されました。
- debug = true ;
- ブレークポイント= '(新しいブレークポイント(\'匿名\ '))。exec(関数(_ $){return eval(_ $);});' ;
- ブレークポイント= 関数 (_name)
- {
- この .name = _name? '匿名' :_name;
- this .allow = true ;
- }
- Breakpoint.prototype.exec = function (_context)
- {
- if (!(デバッグ&& this .allow))
- {
- 帰る
- }
- ...
- }
次のように書くことができます:
*このソースコードは、 ソースコードハイライターで強調表示されました。
- eval(ブレークポイント);
アイデアをありがとうasmolianinov (コメントを参照)。