Difference between revisions of "Debugger; keyword"

From FirebugWiki
Jump to: navigation, search
(Description of debugger; keyword)
 
(Made redirection page out of this)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
To stop script execution at a specific line inside your code you can use the <code>debugger;</code> keyword.
+
#REDIRECT[[Script Debugging#debugger; keyword]]
As soon as this line is reached, the execution is halted, Firebug switches to the [[Script Panel]] and a break notification is shown.
+
Break notifications can be disabled by unchecking the "Show Break Notifications" option inside the [[Script Panel#Options Mini Menu|Script Panel's Options Mini Menu]].
+
 
+
'''Example:'''
+
<code>
+
  function test(variable) {
+
    for(var i=0; i<10; i++) {
+
      if(i == 5)
+
        debugger;
+
    }
+
  }
+
</code>
+

Latest revision as of 00:43, 16 September 2013