- Posted by mateid on March 25, 2008
We all know the "debugger" JavaScript statement will cause your script to break in the debugger. You can use this statement with like if {} else {} and conditionally break into the debugger in your script. See an example below.
1: function ConditionalBreakPoint()
2: {
3: debugger;
4:
5: for(i=0;i<20;i++)
6: {
7: if(i==10)
8: {
9: debugger;
10: Sys.Debug.trace("Debugger " + i);
11: }
12: Sys.Debug.trace(i);
13: }
14: }
- Posted by mateid on January 10, 2008
Very good list of Javascript and HTML resources over at MooTools site.
MooTools Help! I Don't Know JavaScript!