Debugger; keyword

From FirebugWiki

(Difference between revisions)
Jump to: navigation, search
m (Changed code block to use syntax highlighting)
(Made redirection page out of this)
 
(One intermediate revision 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:'''
+
-
<syntaxHighlight lang="javascript">
+
-
  function test(variable) {
+
-
    for(var i=0; i<10; i++) {
+
-
      if(i == 5)
+
-
        debugger;
+
-
    }
+
-
  }
+
-
</syntaxHighlight>
+
-
 
+
-
== Discussion ==
+
-
 
+
-
* On ''breakpoint markers'': http://groups.google.com/group/firebug-working-group/browse_thread/thread/6dece6d4300c971b
+

Latest revision as of 08:43, 16 September 2013

  1. REDIRECTScript Debugging#debugger; keyword
Personal tools