Reputation: 113335
I set a new breakpoint using setBreakpoint(3)
(where 3
is the line number).
If I want to remove it I can use clearBreakpoint(3)
, but how can I remove all breakpoints added this way?
Upvotes: 4
Views: 1174
Reputation: 3425
This is not ideal, but, it works. You can use the following - I left it as a one-liner so you can copy it easily. Note: the output is ugly, but it works.
var i=500; while(i--){clearBreakpoint('/path/to/file/with/breakpoints.js', i); }
Of course, first make sure you set i
= to the number of lines in your file or at least the last one with a breakpoint on it, and, your own file path. Note: you may not need to specify file name if you didn't specify it when you set the breakpoint.
Expanded for readability:
var i = 500; // number of lines in file
while(i--){
// in my experiments, you *must* use the filename, but
// I had defined my filename when I set the breakpoints
clearBreakpoint('/path/to/file/with/breakpoints.js', i);
}
Upvotes: 1