1name = "ignore"; 2 3group = "breakpoints"; 4 5shortDescription = "Set ignore-count of a breakpoint"; 6 7longDescription = "ignore <breakpoint-id> <count> : Ignores the breakpoint with the given id the next count times it is hit."; 8 9seeAlso = [ "condition" ]; 10 11function execute() { 12 if (arguments.length < 1) { 13 message("Missing arguments (breakpoing number and ignore-count)."); 14 return; 15 } 16 if (arguments.length < 2) { 17 message("Missing argument (ignore-count)."); 18 return; 19 } 20 var id = parseInt(arguments[0]); 21 if (isNaN(id)) { 22 message("First argument (breakpoint id) must be a number."); 23 return; 24 } 25 var count = parseInt(arguments[1]); 26 if (isNaN(count)) { 27 message("Second argument (ignore-count) must be a number."); 28 return; 29 } 30 scheduleGetBreakpointData(id); 31 breakpointId = id; 32 if (count < 0) 33 count = 0; 34 ignoreCount = count; 35 state = 1; 36} 37 38function handleResponse(resp) { 39 if (state == 1) { 40 var data = resp.result; 41 if (data == undefined) { 42 message("No breakpoint number " + breakpointId + "."); 43 return; 44 } 45 data.ignoreCount = ignoreCount; 46 scheduleSetBreakpointData(breakpointId, data); 47 state = 2; 48 } else if (state == 2) { 49 message("Breakpoint " + breakpointId + " will be ignored the next " + ignoreCount + " time(s)."); 50 } 51} 52