this.frameCommandToJSONRequest_('' +
(Debug.State.currentFrame + 1));
break;
-
+
case 'down':
case 'do':
this.request_ =
this.frameCommandToJSONRequest_('' +
(Debug.State.currentFrame - 1));
break;
-
+
case 'set':
case 'print':
case 'p':
arg2 = 'uncaught';
}
excType = arg2;
-
+
// Check for:
// en[able] [all|unc[aught]] exc[eptions]
// dis[able] [all|unc[aught]] exc[eptions]
request.arguments.ignoreCount = parseInt(otherArgs);
break;
default:
- throw new Error('Invalid arguments.');
+ throw new Error('Invalid arguments.');
}
} else {
throw new Error('Invalid arguments.');
start_index = parseInt(args[i]);
// The user input start index starts at 1:
if (start_index <= 0) {
- throw new Error('Invalid index ' + args[i] + '.');
+ throw new Error('Invalid index ' + args[i] + '.');
}
start_index -= 1;
is_verbose = true;
} else if (body.breakOnUncaughtExceptions) {
result += '* breaking on UNCAUGHT exceptions is enabled\n';
} else {
- result += '* all exception breakpoints are disabled\n';
+ result += '* all exception breakpoints are disabled\n';
}
details.text = result;
break;
return this.script_name_ == script.nameOrSourceURL();
} else if (this.type_ == Debug.ScriptBreakPointType.ScriptRegExp) {
return this.script_regexp_object_.test(script.nameOrSourceURL());
- } else {
+ } else {
throw new Error("Unexpected breakpoint type " + this.type_);
}
}
response.failed('Missing argument "type" or "target"');
return;
}
-
+
// Either function or script break point.
var break_point_number;
if (type == 'function') {
break_point_number =
Debug.setScriptBreakPointByName(target, line, column, condition,
groupId);
- } else if (type == 'scriptId') {
+ } else if (type == 'scriptId') {
break_point_number =
Debug.setScriptBreakPointById(target, line, column, condition, groupId);
- } else if (type == 'scriptRegExp') {
+ } else if (type == 'scriptRegExp') {
break_point_number =
Debug.setScriptBreakPointByRegExp(target, line, column, condition,
groupId);
description.type = 'scriptRegExp';
description.script_regexp = break_point.script_regexp_object().source;
} else {
- throw new Error("Internal error: Unexpected breakpoint type: " + break_point.type());
+ throw new Error("Internal error: Unexpected breakpoint type: " + break_point.type());
}
array.push(description);
}
enabled = !Debug.isBreakOnException();
} else if (type == 'uncaught') {
enabled = !Debug.isBreakOnUncaughtException();
- }
+ }
// Pull out and check the 'enabled' argument if present:
if (!IS_UNDEFINED(request.arguments.enabled)) {
if (!IS_UNDEFINED(frame) && global) {
return response.failed('Arguments "frame" and "global" are exclusive');
}
-
+
var additional_context_object;
if (additional_context) {
additional_context_object = {};
for (var i = 0; i < additional_context.length; i++) {
var mapping = additional_context[i];
if (!IS_STRING(mapping.name) || !IS_NUMBER(mapping.handle)) {
- return response.failed("Context element #" + i +
+ return response.failed("Context element #" + i +
" must contain name:string and handle:number");
- }
+ }
var context_value_mirror = LookupMirror(mapping.handle);
if (!context_value_mirror) {
return response.failed("Context object '" + mapping.name +
"' #" + mapping.handle + "# not found");
}
- additional_context_object[mapping.name] = context_value_mirror.value();
+ additional_context_object[mapping.name] = context_value_mirror.value();
}
}