kopia lustrzana https://github.com/c9/core
cleanup DevtoolsProtocol.js
rodzic
6fd7bb1981
commit
a89660aac1
|
@ -41,34 +41,32 @@ var DevtoolsProtocol = module.exports = function(socket) {
|
||||||
return this.callbacks[message.id](message.result, message.error);
|
return this.callbacks[message.id](message.result, message.error);
|
||||||
} else {
|
} else {
|
||||||
var params = message.params;
|
var params = message.params;
|
||||||
if (message.method == "Debugger.scriptParsed") {
|
switch (message.method) {
|
||||||
this.$scripts[params.scriptId] = params;
|
case "Debugger.scriptParsed":
|
||||||
this._signal("afterCompile", params);
|
this.$scripts[params.scriptId] = params;
|
||||||
}
|
this._signal("afterCompile", params);
|
||||||
else if (message.method == "Runtime.executionContextCreated") {
|
break;
|
||||||
console.log(message.params);
|
case "Runtime.executionContextCreated":
|
||||||
}
|
// TODO add support for threads
|
||||||
else if (message.method == "Runtime.executionContextDestroyed") {
|
break;
|
||||||
console.log(message.params);
|
case "Runtime.executionContextDestroyed":
|
||||||
this.detachDebugger();
|
console.log(message.params);
|
||||||
}
|
this.detachDebugger();
|
||||||
else if (message.method == "Debugger.resumed") {
|
break;
|
||||||
this.$callstack = null;
|
case "Debugger.resumed":
|
||||||
this._signal("changeRunning", params);
|
this.$callstack = null;
|
||||||
console.warn(message);
|
this._signal("changeRunning", params);
|
||||||
}
|
break;
|
||||||
else if (message.method == "Debugger.paused") {
|
case "Debugger.paused":
|
||||||
this.$callstack = params;
|
this.$callstack = params;
|
||||||
this._signal("changeRunning", params);
|
this._signal("changeRunning", params);
|
||||||
console.warn(message);
|
if (params.reason == "exception")
|
||||||
if (params.reason == "exception") {
|
this._signal("exception", params);
|
||||||
this._signal("exception", params);
|
else
|
||||||
} else {
|
this._signal("break", params);
|
||||||
this._signal("break", params);
|
break;
|
||||||
}
|
case "Runtime.consoleAPICalled":
|
||||||
}
|
break;
|
||||||
else {
|
|
||||||
console.warn(message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -233,7 +231,7 @@ var DevtoolsProtocol = module.exports = function(socket) {
|
||||||
|
|
||||||
|
|
||||||
this.changelive = function(scriptId, newSource, previewOnly, callback, $retry) {
|
this.changelive = function(scriptId, newSource, previewOnly, callback, $retry) {
|
||||||
that.$send("Debugger.setScriptSource", {
|
this.$send("Debugger.setScriptSource", {
|
||||||
scriptId: scriptId,
|
scriptId: scriptId,
|
||||||
scriptSource: newSource,
|
scriptSource: newSource,
|
||||||
dryRun: !!previewOnly
|
dryRun: !!previewOnly
|
||||||
|
|
Ładowanie…
Reference in New Issue