summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkozyatinskiy <kozyatinskiy@chromium.org>2016-03-25 16:50:06 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 23:51:03 +0000
commit33345729e3a257ac99bd98dfafabfb5ea02ab2d1 (patch)
tree5362174fc6fc7a0a2de4757e23e2cf2c43958790
parent1eb45619341b00e6ddf9c92f34451da17bf20dfd (diff)
downloadchromium_src-33345729e3a257ac99bd98dfafabfb5ea02ab2d1.zip
chromium_src-33345729e3a257ac99bd98dfafabfb5ea02ab2d1.tar.gz
chromium_src-33345729e3a257ac99bd98dfafabfb5ea02ab2d1.tar.bz2
[DevTools] Add DebuggerScript.js compilation to compile_frontend.py
Added debugger_script_externs.js with V8 types and output DebuggerScript types. R=dgozman@chromium.org Review URL: https://codereview.chromium.org/1833893002 Cr-Commit-Position: refs/heads/master@{#383411}
-rwxr-xr-xthird_party/WebKit/Source/devtools/scripts/compile_frontend.py16
-rw-r--r--third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js196
-rw-r--r--third_party/WebKit/Source/platform/v8_inspector/debugger_script_externs.js546
3 files changed, 729 insertions, 29 deletions
diff --git a/third_party/WebKit/Source/devtools/scripts/compile_frontend.py b/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
index fa792f0..b95dee3 100755
--- a/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
+++ b/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
@@ -78,6 +78,8 @@ global_externs_file = to_platform_path(path.join(devtools_frontend_path, 'extern
protocol_externs_file = path.join(devtools_frontend_path, 'protocol_externs.js')
injected_script_source_name = path.join(v8_inspector_path, 'InjectedScriptSource.js')
injected_script_externs_file = path.join(v8_inspector_path, 'injected_script_externs.js')
+debugger_script_source_name = path.join(v8_inspector_path, 'DebuggerScript.js')
+debugger_script_externs_file = path.join(v8_inspector_path, 'debugger_script_externs.js')
jsmodule_name_prefix = 'jsmodule_'
runtime_module_name = '_runtime'
@@ -403,6 +405,16 @@ command = spawned_compiler_command + [
injectedScriptCompileProc = popen(command)
+print 'Compiling DebuggerScript.js...'
+
+command = spawned_compiler_command + [
+ '--externs', to_platform_path_exact(debugger_script_externs_file),
+ '--module', jsmodule_name_prefix + 'debugger_script' + ':1',
+ '--js', to_platform_path(debugger_script_source_name)
+]
+
+debuggerScriptCompileProc = popen(command)
+
print 'Compiling devtools.js...'
command = spawned_compiler_command + [
@@ -492,6 +504,10 @@ if error_count:
print 'InjectedScriptSource.js compilation output:%s' % os.linesep, injectedScriptCompileOut
errors_found |= hasErrors(injectedScriptCompileOut)
+(debuggerScriptCompilerOut, _) = debuggerScriptCompileProc.communicate()
+print 'DebuggerScript.js compilation output:%s' % os.linesep, debuggerScriptCompilerOut
+errors_found |= hasErrors(debuggerScriptCompilerOut)
+
(devtoolsJSCompileOut, _) = devtoolsJSCompileProc.communicate()
print 'devtools.js compilation output:%s' % os.linesep, devtoolsJSCompileOut
errors_found |= hasErrors(devtoolsJSCompileOut)
diff --git a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
index 7d8c166..c4992db 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
@@ -33,6 +33,7 @@
var DebuggerScript = {};
+/** @enum */
DebuggerScript.PauseOnExceptionsState = {
DontPauseOnExceptions: 0,
PauseOnAllExceptions: 1,
@@ -43,36 +44,45 @@ DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.D
Debug.clearBreakOnException();
Debug.clearBreakOnUncaughtException();
+/**
+ * @param {!CompileEvent} eventData
+ */
DebuggerScript.getAfterCompileScript = function(eventData)
{
- return DebuggerScript._formatScript(eventData.script_.script_);
+ return DebuggerScript._formatScript(eventData.script().value());
}
-DebuggerScript._scopeTypeNames = { __proto__: null };
-DebuggerScript._scopeTypeNames[ScopeType.Global] = "global";
-DebuggerScript._scopeTypeNames[ScopeType.Local] = "local";
-DebuggerScript._scopeTypeNames[ScopeType.With] = "with";
-DebuggerScript._scopeTypeNames[ScopeType.Closure] = "closure";
-DebuggerScript._scopeTypeNames[ScopeType.Catch] = "catch";
-DebuggerScript._scopeTypeNames[ScopeType.Block] = "block";
-DebuggerScript._scopeTypeNames[ScopeType.Script] = "script";
-
+/** @type {!Map<!ScopeType, string>} */
+DebuggerScript._scopeTypeNames = new Map();
+DebuggerScript._scopeTypeNames.set(ScopeType.Global, "global");
+DebuggerScript._scopeTypeNames.set(ScopeType.Local, "local");
+DebuggerScript._scopeTypeNames.set(ScopeType.With, "with");
+DebuggerScript._scopeTypeNames.set(ScopeType.Closure, "closure");
+DebuggerScript._scopeTypeNames.set(ScopeType.Catch, "catch");
+DebuggerScript._scopeTypeNames.set(ScopeType.Block, "block");
+DebuggerScript._scopeTypeNames.set(ScopeType.Script, "script");
+
+/**
+ * @param {function()} fun
+ * @return {?Array<!Scope>}
+ */
DebuggerScript.getFunctionScopes = function(fun)
{
var mirror = MakeMirror(fun);
if (!mirror.isFunction())
return null;
- var count = mirror.scopeCount();
+ var functionMirror = /** @type {!FunctionMirror} */(mirror);
+ var count = functionMirror.scopeCount();
if (count == 0)
return null;
var result = [];
for (var i = 0; i < count; i++) {
- var scopeDetails = mirror.scope(i).details();
+ var scopeDetails = functionMirror.scope(i).details();
var scopeObject = DebuggerScript._buildScopeObject(scopeDetails.type(), scopeDetails.object());
if (!scopeObject)
continue;
result.push({
- type: DebuggerScript._scopeTypeNames[scopeDetails.type()],
+ type: /** @type {string} */(DebuggerScript._scopeTypeNames.get(scopeDetails.type())),
object: scopeObject,
name: scopeDetails.name() || ""
});
@@ -80,21 +90,26 @@ DebuggerScript.getFunctionScopes = function(fun)
return result;
}
+/**
+ * @param {Object} object
+ * @return {?GeneratorObjectDetails}
+ */
DebuggerScript.getGeneratorObjectDetails = function(object)
{
var mirror = MakeMirror(object, true /* transient */);
if (!mirror.isGenerator())
return null;
- var funcMirror = mirror.func();
+ var generatorMirror = /** @type {!GeneratorMirror} */(mirror);
+ var funcMirror = generatorMirror.func();
if (!funcMirror.resolved())
return null;
var result = {
"function": funcMirror.value(),
"functionName": funcMirror.debugName(),
- "status": mirror.status()
+ "status": generatorMirror.status()
};
var script = funcMirror.script();
- var location = mirror.sourceLocation() || funcMirror.sourceLocation();
+ var location = generatorMirror.sourceLocation() || funcMirror.sourceLocation();
if (script && location) {
result["location"] = {
"scriptId": String(script.id()),
@@ -105,20 +120,28 @@ DebuggerScript.getGeneratorObjectDetails = function(object)
return result;
}
+/**
+ * @param {Object} object
+ * @return {!Array<!{value: *}>|undefined}
+ */
DebuggerScript.getCollectionEntries = function(object)
{
var mirror = MakeMirror(object, true /* transient */);
if (mirror.isMap())
- return mirror.entries();
+ return /** @type {!MapMirror} */(mirror).entries();
if (mirror.isSet() || mirror.isIterator()) {
var result = [];
- var values = mirror.isSet() ? mirror.values() : mirror.preview();
+ var values = mirror.isSet() ? /** @type {!SetMirror} */(mirror).values() : /** @type {!IteratorMirror} */(mirror).preview();
for (var i = 0; i < values.length; ++i)
result.push({ value: values[i] });
return result;
}
}
+/**
+ * @param {string} contextGroupId
+ * @return {!Array<!FormattedScript>}
+ */
DebuggerScript.getScripts = function(contextGroupId)
{
var result = [];
@@ -141,6 +164,10 @@ DebuggerScript.getScripts = function(contextGroupId)
return result;
}
+/**
+ * @param {!Script} script
+ * @return {!FormattedScript}
+ */
DebuggerScript._formatScript = function(script)
{
var lineEnds = script.line_ends;
@@ -192,6 +219,11 @@ DebuggerScript._formatScript = function(script)
};
}
+/**
+ * @param {!ExecutionState} execState
+ * @param {!BreakpointInfo} info
+ * @return {string|undefined}
+ */
DebuggerScript.setBreakpoint = function(execState, info)
{
var positionAlignment = info.interstatementLocation ? Debug.BreakPositionAlignment.BreakPosition : Debug.BreakPositionAlignment.Statement;
@@ -205,16 +237,26 @@ DebuggerScript.setBreakpoint = function(execState, info)
return breakId.toString();
}
+/**
+ * @param {!ExecutionState} execState
+ * @param {!{breakpointId: number}} info
+ */
DebuggerScript.removeBreakpoint = function(execState, info)
{
Debug.findBreakPoint(info.breakpointId, true);
}
+/**
+ * @return {number}
+ */
DebuggerScript.pauseOnExceptionsState = function()
{
return DebuggerScript._pauseOnExceptionsState;
}
+/**
+ * @param {number} newState
+ */
DebuggerScript.setPauseOnExceptionsState = function(newState)
{
DebuggerScript._pauseOnExceptionsState = newState;
@@ -230,11 +272,19 @@ DebuggerScript.setPauseOnExceptionsState = function(newState)
Debug.clearBreakOnUncaughtException();
}
+/**
+ * @param {!ExecutionState} execState
+ * @return {number}
+ */
DebuggerScript.frameCount = function(execState)
{
return execState.frameCount();
}
+/**
+ * @param {!ExecutionState} execState
+ * @return {!JavaScriptCallFrame|undefined}
+ */
DebuggerScript.currentCallFrame = function(execState)
{
var frameCount = execState.frameCount();
@@ -246,6 +296,11 @@ DebuggerScript.currentCallFrame = function(execState)
return topFrame;
}
+/**
+ * @param {!ExecutionState} execState
+ * @param {number} index
+ * @return {!JavaScriptCallFrame|undefined}
+ */
DebuggerScript.currentCallFrameByIndex = function(execState, index)
{
if (index < 0)
@@ -256,21 +311,33 @@ DebuggerScript.currentCallFrameByIndex = function(execState, index)
return DebuggerScript._frameMirrorToJSCallFrame(execState.frame(index), undefined);
}
+/**
+ * @param {!ExecutionState} execState
+ */
DebuggerScript.stepIntoStatement = function(execState)
{
execState.prepareStep(Debug.StepAction.StepIn);
}
+/**
+ * @param {!ExecutionState} execState
+ */
DebuggerScript.stepFrameStatement = function(execState)
{
execState.prepareStep(Debug.StepAction.StepFrame);
}
+/**
+ * @param {!ExecutionState} execState
+ */
DebuggerScript.stepOverStatement = function(execState)
{
execState.prepareStep(Debug.StepAction.StepNext);
}
+/**
+ * @param {!ExecutionState} execState
+ */
DebuggerScript.stepOutOfFunction = function(execState)
{
execState.prepareStep(Debug.StepAction.StepOut);
@@ -285,6 +352,12 @@ DebuggerScript.clearStepping = function()
// [ 0, <v8_result_report> ] in case of success
// or [ 1, <general_error_message>, <compiler_message>, <line_number>, <column_number> ] in case of compile error, numbers are 1-based.
// or throws exception with message.
+/**
+ * @param {number} scriptId
+ * @param {string} newSource
+ * @param {boolean} preview
+ * @return {!Array<*>}
+ */
DebuggerScript.liveEditScriptSource = function(scriptId, newSource, preview)
{
var scripts = Debug.scripts();
@@ -304,7 +377,7 @@ DebuggerScript.liveEditScriptSource = function(scriptId, newSource, preview)
return [0, result.stack_modified];
} catch (e) {
if (e instanceof Debug.LiveEdit.Failure && "details" in e) {
- var details = e.details;
+ var details = /** @type {!LiveEditErrorDetails} */(e.details);
if (details.type === "liveedit_compile_error") {
var startPosition = details.position.start;
return [1, String(e), String(details.syntaxErrorMessage), Number(startPosition.line), Number(startPosition.column)];
@@ -314,16 +387,26 @@ DebuggerScript.liveEditScriptSource = function(scriptId, newSource, preview)
}
}
-DebuggerScript.clearBreakpoints = function(execState, info)
+/**
+ * @param {!ExecutionState} execState
+ */
+DebuggerScript.clearBreakpoints = function(execState)
{
Debug.clearAllBreakPoints();
}
+/**
+ * @param {!ExecutionState} execState
+ * @param {!{enabled: boolean}} info
+ */
DebuggerScript.setBreakpointsActivated = function(execState, info)
{
Debug.debuggerFlags().breakPointsActive.setValue(info.enabled);
}
+/**
+ * @param {!BreakEvent} eventData
+ */
DebuggerScript.getBreakpointNumbers = function(eventData)
{
var breakpoints = eventData.breakPointsHit();
@@ -342,6 +425,11 @@ DebuggerScript.getBreakpointNumbers = function(eventData)
// NOTE: This function is performance critical, as it can be run on every
// statement that generates an async event (like addEventListener) to support
// asynchronous call stacks. Thus, when possible, initialize the data lazily.
+/**
+ * @param {!FrameMirror} frameMirror
+ * @param {!JavaScriptCallFrame|undefined} callerFrame
+ * @return {!JavaScriptCallFrame}
+ */
DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
{
// Stuff that can not be initialized lazily (i.e. valid while paused with a valid break_id).
@@ -356,11 +444,17 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var returnValue = isAtReturn ? frameDetails.returnValue() : undefined;
var scopeMirrors = frameMirror.allScopes(false);
+ /** @type {!Array<ScopeType>} */
var scopeTypes = new Array(scopeMirrors.length);
+ /** @type {?Array<!Object>} */
var scopeObjects = new Array(scopeMirrors.length);
+ /** @type {!Array<string|undefined>} */
var scopeNames = new Array(scopeMirrors.length);
+ /** @type {?Array<number>} */
var scopeStartPositions = new Array(scopeMirrors.length);
+ /** @type {?Array<number>} */
var scopeEndPositions = new Array(scopeMirrors.length);
+ /** @type {?Array<function()|null>} */
var scopeFunctions = new Array(scopeMirrors.length);
for (var i = 0; i < scopeMirrors.length; ++i) {
var scopeDetails = scopeMirrors[i].details();
@@ -376,10 +470,17 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var scopeChain;
var funcMirror;
var location;
+ /** @type {!Array<?RawLocation>} */
var scopeStartLocations;
+ /** @type {!Array<?RawLocation>} */
var scopeEndLocations;
var details;
+ /**
+ * @param {!ScriptMirror|undefined} script
+ * @param {number} pos
+ * @return {?RawLocation}
+ */
function createLocation(script, pos)
{
if (!script)
@@ -393,7 +494,10 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
}
}
- function lazyScopeChain()
+ /**
+ * @return {!Array<!Object>}
+ */
+ function ensureScopeChain()
{
if (!scopeChain) {
scopeChain = [];
@@ -402,7 +506,7 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
for (var i = 0, j = 0; i < scopeObjects.length; ++i) {
var scopeObject = DebuggerScript._buildScopeObject(scopeTypes[i], scopeObjects[i]);
if (scopeObject) {
- scopeTypes[j] = DebuggerScript._scopeTypeNames[scopeTypes[i]];
+ scopeTypes[j] = scopeTypes[i];
scopeNames[j] = scopeNames[i];
scopeChain[j] = scopeObject;
@@ -410,7 +514,7 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
if (!funcMirror || !funcMirror.isFunction())
funcMirror = new UnresolvedFunctionMirror(funcObject);
- var script = funcMirror.script();
+ var script = /** @type {!FunctionMirror} */(funcMirror).script();
scopeStartLocations[j] = createLocation(script, scopeStartPositions[i]);
scopeEndLocations[j] = createLocation(script, scopeEndPositions[i]);
++j;
@@ -426,23 +530,27 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
return scopeChain;
}
+ /**
+ * @return {!JavaScriptCallFrameDetails}
+ */
function lazyDetails()
{
if (!details) {
- var scopeObjects = lazyScopeChain();
+ var scopeObjects = ensureScopeChain();
var script = ensureFuncMirror().script();
+ /** @type {!Array<Scope>} */
var scopes = [];
for (var i = 0; i < scopeObjects.length; ++i) {
var scope = {
- "type": scopeTypes[i],
+ "type": /** @type {string} */(DebuggerScript._scopeTypeNames.get(scopeTypes[i])),
"object": scopeObjects[i],
};
if (scopeNames[i])
scope.name = scopeNames[i];
if (scopeStartLocations[i])
- scope.startLocation = scopeStartLocations[i];
+ scope.startLocation = /** @type {!RawLocation} */(scopeStartLocations[i]);
if (scopeEndLocations[i])
- scope.endLocation = scopeEndLocations[i];
+ scope.endLocation = /** @type {!RawLocation} */(scopeEndLocations[i]);
scopes.push(scope);
}
details = {
@@ -469,6 +577,9 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
return details;
}
+ /**
+ * @return {!FunctionMirror}
+ */
function ensureFuncMirror()
{
if (!funcMirror) {
@@ -476,9 +587,12 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
if (!funcMirror.isFunction())
funcMirror = new UnresolvedFunctionMirror(funcObject);
}
- return funcMirror;
+ return /** @type {!FunctionMirror} */(funcMirror);
}
+ /**
+ * @return {!{line: number, column: number}}
+ */
function ensureLocation()
{
if (!location) {
@@ -491,32 +605,51 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
return location;
}
+ /**
+ * @return {number}
+ */
function line()
{
return ensureLocation().line;
}
+ /**
+ * @return {number}
+ */
function column()
{
return ensureLocation().column;
}
+ /**
+ * @return {number|undefined}
+ */
function sourceID()
{
var script = ensureFuncMirror().script();
return script && script.id();
}
+ /**
+ * @param {string} expression
+ * @return {*}
+ */
function evaluate(expression)
{
return frameMirror.evaluate(expression, false).value();
}
+ /** @return {undefined} */
function restart()
{
return frameMirror.restart();
}
+ /**
+ * @param {number} scopeNumber
+ * @param {string} variableName
+ * @param {*} newValue
+ */
function setVariableValue(scopeNumber, variableName, newValue)
{
var scopeMirror = frameMirror.scope(scopeNumber);
@@ -539,6 +672,11 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
};
}
+/**
+ * @param {number} scopeType
+ * @param {!Object} scopeObject
+ * @return {!Object|undefined}
+ */
DebuggerScript._buildScopeObject = function(scopeType, scopeObject)
{
var result;
@@ -552,7 +690,7 @@ DebuggerScript._buildScopeObject = function(scopeType, scopeObject)
// the same properties.
// Reset scope object prototype to null so that the proto properties
// don't appear in the local scope section.
- var properties = MakeMirror(scopeObject, true /* transient */).properties();
+ var properties = /** @type {!ObjectMirror} */(MakeMirror(scopeObject, true /* transient */)).properties();
// Almost always Script scope will be empty, so just filter out that noise.
// Also drop empty Block scopes, should we get any.
if (!properties.length && (scopeType === ScopeType.Script || scopeType === ScopeType.Block))
diff --git a/third_party/WebKit/Source/platform/v8_inspector/debugger_script_externs.js b/third_party/WebKit/Source/platform/v8_inspector/debugger_script_externs.js
new file mode 100644
index 0000000..75e7a16
--- /dev/null
+++ b/third_party/WebKit/Source/platform/v8_inspector/debugger_script_externs.js
@@ -0,0 +1,546 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/** @typedef {{
+ type: string,
+ object: !Object,
+ name: (string|undefined),
+ startLocation: (!RawLocation|undefined),
+ endLocation: (!RawLocation|undefined)
+ }} */
+var Scope;
+
+/** @typedef {{
+ scriptId: string,
+ lineNumber: number,
+ columnNumber: number
+ }} */
+var RawLocation;
+
+/** @typedef {{
+ function: function(),
+ functionName: string,
+ status: string,
+ location: (!RawLocation|undefined)
+ }} */
+var GeneratorObjectDetails;
+
+/** @typedef {{
+ id: number,
+ name: string,
+ sourceURL: (string|undefined),
+ sourceMappingURL: (string|undefined),
+ source: string,
+ startLine: number,
+ endLine: number,
+ startColumn: number,
+ endColumn: number,
+ executionContextId: number,
+ isContentScript: boolean,
+ isInternalScript: boolean
+ }} */
+var FormattedScript;
+
+/** @typedef {{
+ functionName: string,
+ location: !RawLocation,
+ this: !Object,
+ scopeChain: !Array<!Scope>,
+ functionLocation: (RawLocation|undefined),
+ returnValue: (*|undefined)
+ }} */
+var JavaScriptCallFrameDetails;
+
+/** @typedef {{
+ sourceID: function():(number|undefined),
+ line: function():number,
+ column: function():number,
+ thisObject: !Object,
+ evaluate: function(string):*,
+ caller: *,
+ restart: function():undefined,
+ setVariableValue: function(number, string, *):undefined,
+ isAtReturn: boolean,
+ details: function():!JavaScriptCallFrameDetails
+ }} */
+var JavaScriptCallFrame;
+
+/** @interface */
+function DebugClass()
+{
+ /** @type {!LiveEditClass} */
+ this.LiveEdit;
+}
+
+DebugClass.prototype.setBreakOnException = function() {}
+
+DebugClass.prototype.clearBreakOnException = function() {}
+
+DebugClass.prototype.setBreakOnUncaughtException = function() {}
+
+DebugClass.prototype.clearBreakOnUncaughtException = function() {}
+
+DebugClass.prototype.clearStepping = function() {}
+
+DebugClass.prototype.clearAllBreakPoints = function() {}
+
+/** @return {!Array<!Script>} */
+DebugClass.prototype.scripts = function() {}
+
+/**
+ * @param {number} scriptId
+ * @param {number=} line
+ * @param {number=} column
+ * @param {string=} condition
+ * @param {string=} groupId
+ * @param {Debug.BreakPositionAlignment=} positionAlignment
+ */
+DebugClass.prototype.setScriptBreakPointById = function(scriptId, line, column, condition, groupId, positionAlignment) {}
+
+/**
+ * @param {number} breakId
+ * @return {!Array<!SourceLocation>}
+ */
+DebugClass.prototype.findBreakPointActualLocations = function(breakId) {}
+
+/**
+ * @param {number} breakId
+ * @param {boolean} remove
+ * @return {!BreakPoint|undefined}
+ */
+DebugClass.prototype.findBreakPoint = function(breakId, remove) {}
+
+/** @return {!DebuggerFlags} */
+DebugClass.prototype.debuggerFlags = function() {}
+
+/** @type {!DebugClass} */
+var Debug;
+
+
+/** @enum */
+Debug.BreakPositionAlignment = {
+ Statement: 0,
+ BreakPosition: 1
+};
+
+/** @enum */
+Debug.StepAction = { StepOut: 0,
+ StepNext: 1,
+ StepIn: 2,
+ StepFrame: 3 };
+
+/** @enum */
+Debug.ScriptCompilationType = { Host: 0,
+ Eval: 1,
+ JSON: 2 };
+
+
+/** @interface */
+function DebuggerFlag() {}
+
+/** @param {boolean} value */
+DebuggerFlag.prototype.setValue = function(value) {}
+
+
+/** @interface */
+function DebuggerFlags()
+{
+ /** @type {!DebuggerFlag} */
+ this.breakPointsActive;
+}
+
+
+/** @interface */
+function LiveEditClass() {}
+
+/**
+ * @param {!Script} script
+ * @param {string} newSource
+ * @param {boolean} previewOnly
+ * @return {!{stack_modified: (boolean|undefined)}}
+ */
+LiveEditClass.prototype.SetScriptSource = function(script, newSource, previewOnly, change_log) {}
+
+
+/** @interface */
+function LiveEditErrorDetails()
+{
+ /** @type {string} */
+ this.syntaxErrorMessage;
+ /** @type {!{start: !{line: number, column: number}}} */
+ this.position;
+}
+
+
+/** @interface */
+function BreakpointInfo()
+{
+ /** @type {number} */
+ this.breakpointId;
+ /** @type {number} */
+ this.sourceID;
+ /** @type {number|undefined} */
+ this.lineNumber;
+ /** @type {number|undefined} */
+ this.columnNumber;
+ /** @type {string|undefined} */
+ this.condition;
+ /** @type {boolean|undefined} */
+ this.interstatementLocation;
+}
+
+
+/** @interface */
+function BreakPoint() {}
+
+/** @return {!BreakPoint|undefined} */
+BreakPoint.prototype.script_break_point = function() {}
+
+/** @return {number} */
+BreakPoint.prototype.number = function() {}
+
+
+/** @interface */
+function CompileEvent() {}
+
+/** @return {!ScriptMirror} */
+CompileEvent.prototype.script = function() {}
+
+
+/** @interface */
+function BreakEvent() {}
+
+/** @return {!Array<!BreakPoint>|undefined} */
+BreakEvent.prototype.breakPointsHit = function() {}
+
+
+/** @interface */
+function ExecutionState() {}
+
+/** @param {!Debug.StepAction} action */
+ExecutionState.prototype.prepareStep = function(action) {}
+
+/**
+ * @param {string} source
+ * @param {boolean} disableBreak
+ * @param {*=} additionalContext
+ */
+ExecutionState.prototype.evaluateGlobal = function(source, disableBreak, additionalContext) {}
+
+/** @return {number} */
+ExecutionState.prototype.frameCount = function() {}
+
+/**
+ * @param {number} index
+ * @return {!FrameMirror}
+ */
+ExecutionState.prototype.frame = function(index) {}
+
+/** @param {number} index */
+ExecutionState.prototype.setSelectedFrame = function(index) {}
+
+/** @return {number} */
+ExecutionState.prototype.selectedFrame = function() {}
+
+
+/** @enum */
+var ScopeType = { Global: 0,
+ Local: 1,
+ With: 2,
+ Closure: 3,
+ Catch: 4,
+ Block: 5,
+ Script: 6 };
+
+
+/** @interface */
+function SourceLocation()
+{
+ /** @type {number} */
+ this.script;
+ /** @type {number} */
+ this.position;
+ /** @type {number} */
+ this.line;
+ /** @type {number} */
+ this.column;
+ /** @type {number} */
+ this.start;
+ /** @type {number} */
+ this.end;
+}
+
+
+/** @interface */
+function Script()
+{
+ /** @type {number} */
+ this.id;
+ /** @type {string|undefined} */
+ this.context_data;
+ /** @type {string|undefined} */
+ this.source_url;
+ /** @type {string|undefined} */
+ this.source_mapping_url;
+ /** @type {boolean} */
+ this.is_debugger_script;
+ /** @type {string} */
+ this.source;
+ /** @type {!Array<number>} */
+ this.line_ends;
+ /** @type {number} */
+ this.line_offset;
+ /** @type {number} */
+ this.column_offset;
+}
+
+/** @return {string} */
+Script.prototype.nameOrSourceURL = function() {}
+
+/** @return {!Debug.ScriptCompilationType} */
+Script.prototype.compilationType = function() {}
+
+
+/** @interface */
+function ScopeDetails() {}
+
+/** @return {!Object} */
+ScopeDetails.prototype.object = function() {}
+
+/** @return {string|undefined} */
+ScopeDetails.prototype.name = function() {}
+
+
+/** @interface */
+function FrameDetails() {}
+
+/** @return {!Object} */
+FrameDetails.prototype.receiver = function() {}
+
+/** @return {function()} */
+FrameDetails.prototype.func = function() {}
+
+/** @return {boolean} */
+FrameDetails.prototype.isAtReturn = function() {}
+
+/** @return {number} */
+FrameDetails.prototype.sourcePosition = function() {}
+
+/** @return {*} */
+FrameDetails.prototype.returnValue = function() {}
+
+/** @return {number} */
+FrameDetails.prototype.scopeCount = function() {}
+
+
+/** @param {boolean} value */
+function ToggleMirrorCache(value) {}
+
+/**
+ * @param {*} value
+ * @param {boolean=} transient
+ * @return {!Mirror}
+ */
+function MakeMirror(value, transient) {}
+
+
+/** @interface */
+function Mirror() {}
+
+/** @return {boolean} */
+Mirror.prototype.isFunction = function() {}
+
+/** @return {boolean} */
+Mirror.prototype.isGenerator = function() {}
+
+/** @return {boolean} */
+Mirror.prototype.isMap = function() {}
+
+/** @return {boolean} */
+Mirror.prototype.isSet = function() {}
+
+/** @return {boolean} */
+Mirror.prototype.isIterator = function() {}
+
+
+/**
+ * @interface
+ * @extends {Mirror}
+ */
+function ObjectMirror() {}
+
+/** @return {!Array<!PropertyMirror>} */
+ObjectMirror.prototype.properties = function() {}
+
+
+/**
+ * @interface
+ * @extends {ObjectMirror}
+ */
+function FunctionMirror () {}
+
+/** @return {number} */
+FunctionMirror.prototype.scopeCount = function() {}
+
+/**
+ * @param {number} index
+ * @return {!ScopeMirror|undefined}
+ */
+FunctionMirror.prototype.scope = function(index) {}
+
+/** @return {boolean} */
+FunctionMirror.prototype.resolved = function() {}
+
+/** @return {function()} */
+FunctionMirror.prototype.value = function() {}
+
+/** @return {string} */
+FunctionMirror.prototype.debugName = function() {}
+
+/** @return {!ScriptMirror|undefined} */
+FunctionMirror.prototype.script = function() {}
+
+/** @return {!SourceLocation|undefined} */
+FunctionMirror.prototype.sourceLocation = function() {}
+
+
+/**
+ * @constructor
+ * @param {*} value
+ */
+function UnresolvedFunctionMirror(value) {}
+
+
+/**
+ * @interface
+ * @extends {ObjectMirror}
+ */
+function MapMirror () {}
+
+/**
+ * @param {number=} limit
+ * @return {!Array<!{key: *, value: *}>}
+ */
+MapMirror.prototype.entries = function(limit) {}
+
+
+/**
+ * @interface
+ * @extends {ObjectMirror}
+ */
+function SetMirror () {}
+
+/**
+ * @param {number=} limit
+ * @return {!Array<*>}
+ */
+SetMirror.prototype.values = function(limit) {}
+
+
+/**
+ * @interface
+ * @extends {ObjectMirror}
+ */
+function IteratorMirror () {}
+
+/**
+ * @param {number=} limit
+ * @return {!Array<*>}
+ */
+IteratorMirror.prototype.preview = function(limit) {}
+
+
+/**
+ * @interface
+ * @extends {ObjectMirror}
+ */
+function GeneratorMirror () {}
+
+/** @return {string} */
+GeneratorMirror.prototype.status = function() {}
+
+/** @return {!SourceLocation|undefined} */
+GeneratorMirror.prototype.sourceLocation = function() {}
+
+/** @return {!FunctionMirror} */
+GeneratorMirror.prototype.func = function() {}
+
+
+/**
+ * @interface
+ * @extends {Mirror}
+ */
+function PropertyMirror()
+{
+ /** @type {*} */
+ this.value_;
+}
+
+/** @return {!Mirror} */
+PropertyMirror.prototype.value = function() {}
+
+/** @return {string} */
+PropertyMirror.prototype.name = function() {}
+
+
+/**
+ * @interface
+ * @extends {Mirror}
+ */
+function FrameMirror() {}
+
+/**
+ * @param {boolean=} ignoreNestedScopes
+ * @return {!Array<!ScopeMirror>}
+ */
+FrameMirror.prototype.allScopes = function(ignoreNestedScopes) {}
+
+/** @return {!FrameDetails} */
+FrameMirror.prototype.details = function() {}
+
+/**
+ * @param {string} source
+ * @param {boolean} disableBreak
+ */
+FrameMirror.prototype.evaluate = function(source, disableBreak) {}
+
+FrameMirror.prototype.restart = function() {}
+
+/** @param {number} index */
+FrameMirror.prototype.scope = function(index) {}
+
+
+/**
+ * @interface
+ * @extends {Mirror}
+ */
+function ScriptMirror() {}
+
+/** @return {!Script} */
+ScriptMirror.prototype.value = function() {}
+
+/** @return {number} */
+ScriptMirror.prototype.id = function() {}
+
+/**
+ * @param {number} position
+ * @param {boolean=} includeResourceOffset
+ */
+ScriptMirror.prototype.locationFromPosition = function(position, includeResourceOffset) {}
+
+
+/**
+ * @interface
+ * @extends {Mirror}
+ */
+function ScopeMirror() {}
+
+/** @return {!ScopeDetails} */
+ScopeMirror.prototype.details = function() {}
+
+/**
+ * @param {string} name
+ * @param {*} newValue
+ */
+ScopeMirror.prototype.setVariableValue = function(name, newValue) {}