|
|
|
@ -84509,9 +84509,6 @@ DbgpSession.prototype.end = function() {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DbgpSession.prototype._handleInit = function(init) {
|
|
|
|
|
if (this.initialized)
|
|
|
|
|
throw new Error("Cannot initialize debugger session more than once");
|
|
|
|
|
|
|
|
|
|
this.protocolVersion = init["@protocol_version"];
|
|
|
|
|
|
|
|
|
|
this.appId = init["@appid"];
|
|
|
|
@ -85150,7 +85147,7 @@ DbgpClient.prototype.close = function() {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
define("text!plugins/c9.ide.run.debug.xdebug/netproxy.js",[],"var net = require(\"net\");\n\nvar debug = function() {};\n\nvar host = \"{HOST}\" || \"127.0.0.1\";\nvar port = parseInt(\"{PORT}\", 10) || 9000;\n\nvar browserBuffer = [];\nvar debugBuffer = [];\nvar browserClient;\nvar debugClient;\n\nvar log = console.log;\n\nconsole.warn = console.log = function() {\n return console.error.apply(console, arguments);\n};\nfunction send() {\n log.apply(console, arguments);\n}\nvar browserServer = net.createServer(function(client) {\n debug(\"browserClient::connect\");\n\n if (browserClient)\n browserClient.end();\n\n browserClient = client;\n debugBuffer = [];\n\n browserClient.on(\"end\", function() {\n debug(\"browserClient::end\");\n process.exit(0);\n browserClient = null;\n });\n\n browserClient.on(\"data\", function(data) {\n debug(\"browserClient::data:\", data.toString(\"utf8\"));\n if (debugClient) {\n debugClient.write(data);\n } else {\n debugBuffer.push(data);\n }\n });\n\n if (browserBuffer.length) {\n browserBuffer.forEach(function(data) {\n browserClient.write(data);\n });\n browserBuffer = [];\n }\n});\n\nbrowserServer.listen(port + 1, host, function() {\n debug(\"netproxy listening for browser on port \" + (port + 1));\n start();\n});\n\nbrowserServer.on(\"error\", function(err) {\n console.log(err);\n process.exit(0);\n});\nvar debugServer = net.createServer(function(client) {\n debug(\"debugClient::connect\");\n\n if (debugClient)\n debugClient.end();\n\n debugClient = client;\n\n debugBuffer = [];\n browserBuffer = [];\n\n debugClient.on(\"end\", function() {\n debug(\"debugClient::end\");\n process.exit(0);\n });\n\n debugClient.on(\"data\", function(data) {\n debug(\"debugClient::data:\", data.toString(\"utf8\"));\n if (browserClient) {\n browserClient.write(data);\n } else {\n browserBuffer.push(data);\n }\n });\n\n if (debugBuffer.length) {\n debugBuffer.forEach(function(data) {\n debugClient.write(data);\n });\n debugBuffer = [];\n }\n});\n\ndebugServer.listen(port, host, function() {\n debug(\"netproxy listening for debugger on port \" + port);\n start();\n});\n\ndebugServer.on(\"error\", function(err) {\n console.log(err);\n process.exit(0);\n});\nvar I = 0;\nfunction start() {\n if (++I == 2)\n send(\"ß\");\n}\n");
|
|
|
|
|
define("text!plugins/c9.ide.run.debug.xdebug/netproxy.js",[],"var net = require(\"net\");\nvar fs = require(\"fs\");\n\nvar debug = function() {};\nvar socketPath = process.env.HOME + \"/.c9/xdebug.sock\";\nif (process.platform == \"win32\")\n socketPath = \"\\\\\\\\.\\\\pipe\\\\\" + socketPath.replace(/\\//g, \"\\\\\");\n\nvar host = \"{HOST}\" || \"127.0.0.1\";\nvar port = parseInt(\"{PORT}\", 10) || 9000;\n\nvar browserBuffer = [];\nvar debugBuffer = [];\nvar browserClient;\nvar debugClient;\n\nvar log = console.log;\n\nconsole.warn = console.log = function() {\n return console.error.apply(console, arguments);\n};\nfunction send() {\n log.apply(console, arguments);\n}\n\nvar browserServer = net.createServer(function(client) {\n debug(\"browserClient::connect\");\n\n if (browserClient)\n browserClient.end();\n\n browserClient = client;\n debugBuffer = [];\n\n browserClient.on(\"end\", function() {\n debug(\"browserClient::end\");\n process.exit(0);\n browserClient = null;\n });\n\n browserClient.on(\"data\", function(data) {\n debug(\"browserClient::data:\", data.toString(\"utf8\"));\n if (debugClient) {\n debugClient.write(data);\n } else {\n debugBuffer.push(data);\n }\n });\n\n if (browserBuffer.length) {\n browserBuffer.forEach(function(data) {\n browserClient.write(data);\n });\n browserBuffer = [];\n }\n});\n\n\nif (process.platform !== \"win32\") {\n try {\n fs.unlinkSync(socketPath);\n } catch (e) {\n if (e.code != \"ENOENT\")\n console.log(e);\n }\n}\nbrowserServer.listen(socketPath, function() {\n debug(\"netproxy listening for \" + socketPath);\n start();\n});\n\nbrowserServer.on(\"error\", function(err) {\n console.log(err);\n process.exit(0);\n});\nbrowserServer.on(\"close\", function(err) {\n console.log(err);\n process.exit(0);\n});\n\nvar debugServer = net.createServer(function(client) {\n debug(\"debugClient::connect\");\n\n if (debugClient)\n debugClient.end();\n\n debugClient = client;\n\n debugBuffer = [];\n browserBuffer = [];\n\n debugClient.on(\"end\", function() {\n debug(\"debugClient::end\");\n process.exit(0);\n });\n\n debugClient.on(\"data\", function(data) {\n debug(\"debugClient::data:\", data.toString(\"utf8\"));\n if (browserClient) {\n browserClient.write(data);\n } else {\n browserBuffer.push(data);\n }\n });\n\n if (debugBuffer.length) {\n debugBuffer.forEach(function(data) {\n debugClient.write(data);\n });\n debugBuffer = [];\n }\n});\n\ndebugServer.listen(port, host, function() {\n debug(\"netproxy listening for debugger on port \" + port);\n start();\n});\n\ndebugServer.on(\"error\", function(err) {\n console.log(err);\n process.exit(0);\n});\n\nvar I = 0;\nfunction start() {\n if (++I == 2)\n send(\"ß\");\n}\n");
|
|
|
|
|
|
|
|
|
|
define("plugins/c9.ide.run.debug.xdebug/xdebug",[], function(require, exports, module) {
|
|
|
|
|
main.consumes = ["Plugin", "c9", "debugger"];
|
|
|
|
@ -85573,11 +85570,17 @@ define("plugins/c9.ide.run.debug.xdebug/xdebug",[], function(require, exports, m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getProxySource(process) {
|
|
|
|
|
return PROXY
|
|
|
|
|
.replace(/\/\/.*/g, "")
|
|
|
|
|
.replace(/[\n\r]/g, "")
|
|
|
|
|
.replace(/\{HOST\}/, process.runner.debughost || "")
|
|
|
|
|
.replace(/\{PORT\}/, process.runner.debugport);
|
|
|
|
|
var socketPath = c9.home + "/.c9/xdebug.sock";
|
|
|
|
|
if (c9.platform == "win32")
|
|
|
|
|
socketPath = "\\\\.\\pipe\\" + socketPath.replace(/\//g, "\\");
|
|
|
|
|
return {
|
|
|
|
|
source: PROXY
|
|
|
|
|
.replace(/^\s*\/\/.*/gm, "")
|
|
|
|
|
.replace(/[\n\r]/g, "")
|
|
|
|
|
.replace(/\{HOST\}/, process.runner.debughost || "")
|
|
|
|
|
.replace(/\{PORT\}/, process.runner.debugport),
|
|
|
|
|
port: socketPath
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setBreakpoints(breakpoints, callback) {
|
|
|
|
|