Last active
December 23, 2016 06:12
-
-
Save sivaprabug/4e165161011d1bbaaa30aecef2bd17b0 to your computer and use it in GitHub Desktop.
Debugger in JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Debugger in JavaScript</title> | |
| <h1 align="center"><u>Debugger in JavaScript</u></h1> | |
| <script> | |
| function testingPurpose() { | |
| debugger; | |
| console.log('debugger'); | |
| // do potentially buggy stuff to examine, step through, etc. | |
| } | |
| testingPurpose() | |
| </script> | |
| </head> | |
| <body> | |
| <div align="center"> | |
| <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/debugger">https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/debugger</a> | |
| </div> | |
| <ol> | |
| <li>When the debugger is invoked, execution is paused at the debugger statement. It is like a breakpoint in the script source.</li> | |
| </ol> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment