Javascript examples for Language Basics:debug
Start Browser Console with debugger command
<!doctype html> <html> <head> <title>Debugger Test Page</title> <script> function debugPrompt()/* www .ja v a2 s.c o m*/ { debugger; // breakpoint console.log("after debugger"); } document.onkeydown = function() { if (event.altKey && event.ctrlKey && event.keyCode === 'D'.charCodeAt(0)) { event.cancelBubble = true; debugPrompt(); return; } } </script> </head> <body> <button onclick="debugPrompt()">Debug</button> </body> </html>