diff --git a/plugins/c9.ide.run.debug/debuggers/chrome/Debugger.js b/plugins/c9.ide.run.debug/debuggers/chrome/Debugger.js index 8b755d41..3288822d 100644 --- a/plugins/c9.ide.run.debug/debuggers/chrome/Debugger.js +++ b/plugins/c9.ide.run.debug/debuggers/chrome/Debugger.js @@ -78,7 +78,15 @@ function Debugger(options) { self.disconnect(); }); ws.on("message", function incoming(data) { + try { + var parsed = JSON.parse(data); + } catch (e) { + } // console.log("<<" + data); + // ignore for now since this is noisy, and is not used on the client + if (parsed && parsed.method == "Runtime.consoleAPICalled") + return; + broadcast(data); }); ws.on("error", function(e) { @@ -128,7 +136,7 @@ function Debugger(options) { if (this.ws) this.ws.close(); if (this.v8Socket) - this.v8Socket.close(); + this.v8Socket.destroy(); }; }).call(Debugger.prototype); diff --git a/plugins/c9.ide.run.debug/debuggers/chrome/DevtoolsProtocol.js b/plugins/c9.ide.run.debug/debuggers/chrome/DevtoolsProtocol.js index 56186ee4..3ad5dec4 100644 --- a/plugins/c9.ide.run.debug/debuggers/chrome/DevtoolsProtocol.js +++ b/plugins/c9.ide.run.debug/debuggers/chrome/DevtoolsProtocol.js @@ -50,7 +50,6 @@ var DevtoolsProtocol = module.exports = function(socket) { // TODO add support for threads break; case "Runtime.executionContextDestroyed": - console.log(message.params); this.detachDebugger(); break; case "Debugger.resumed":