1 | name = "clear";
|
---|
2 |
|
---|
3 | group = "breakpoints";
|
---|
4 |
|
---|
5 | shortDescription = "Clear breakpoint at specified location";
|
---|
6 |
|
---|
7 | longDescription = "clear <file>:<line> : Clear breakpoints at the given location.";
|
---|
8 | longDescription += "\nclear <line> : Clear breakpoints at the given line of the current script.";
|
---|
9 |
|
---|
10 | seeAlso = [ "delete" ];
|
---|
11 |
|
---|
12 | argumentTypes = [ "script-filename" ];
|
---|
13 |
|
---|
14 | function execute() {
|
---|
15 | if (arguments.length == 0) {
|
---|
16 | message("Missing argument.");
|
---|
17 | return;
|
---|
18 | }
|
---|
19 | var arg = arguments[0];
|
---|
20 | var colonIndex = arg.lastIndexOf(':');
|
---|
21 | if (colonIndex == -1) {
|
---|
22 | lineNumber = parseInt(arg);
|
---|
23 | if (isNaN(lineNumber)) {
|
---|
24 | message("Breakpoint location must be of the form <file>:<line> or <line>.");
|
---|
25 | return;
|
---|
|
---|