Skip to content

Instantly share code, notes, and snippets.

@sivaprabug
Last active December 23, 2016 06:12
Show Gist options
  • Select an option

  • Save sivaprabug/4e165161011d1bbaaa30aecef2bd17b0 to your computer and use it in GitHub Desktop.

Select an option

Save sivaprabug/4e165161011d1bbaaa30aecef2bd17b0 to your computer and use it in GitHub Desktop.
Debugger in JavaScript
<!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