From a91621fdb40a7bab92d72d779c4fcf6174e35130 Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 27 Jul 2013 00:06:25 +0100 Subject: [PATCH] Debugging console server module --- server_modules/web_agent_debugger.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 server_modules/web_agent_debugger.js diff --git a/server_modules/web_agent_debugger.js b/server_modules/web_agent_debugger.js new file mode 100644 index 0000000..b82c2e2 --- /dev/null +++ b/server_modules/web_agent_debugger.js @@ -0,0 +1,22 @@ +/** + * Server debugging via node-webkit-agent + * https://github.com/c4milo/node-webkit-agent + * + * Requires npm module: webkit-devtools-agent + */ + + +var kiwiModules = require('../server/modules'), + DevToolsAgent = require('webkit-devtools-agent'); + + +var module = new kiwiModules.Module('web_agent_debugger'); + +var agent = new DevToolsAgent(); +agent.start(); + +console.log('Debugging can be accessed via http://c4milo.github.io/node-webkit-agent/26.0.1410.65/inspector.html?host=localhost:9999&page=0'); + +module.on('dispose', function() { + agent.stop(); +}); \ No newline at end of file -- 2.25.1