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: }