Page 1 of 1

JS Debugging?

Posted: 26 Dec 2016 16:23
by kWave
Hey,

i want to enable JS Debugging on my Z-Way server to watch console.log() messages

I already tried everything in this thread, but it seems to be outdated, as nothing worked for me.


How can i enable JS debugging? (latest Z-Way Version)

Re: JS Debugging?

Posted: 26 Dec 2016 23:42
by kWave
Okay, i got the debugger running using these steps:

sudo apt-get install npm
sudo npm install -g node-inspector@0.7.4

added "export V8_DEBUG=yes" to /etc/init.d/z-way-server
added "<automation-file>automation/main.js</automation-file>" and "<debug-port>8183</debug-port>" to /opt/z-way-server/config.xml

When i start the node-inspector ("sudo node-inspector --debug-port 8183) and restart the z-way-server,
i can see all the files, can set breakpoints, but there are no outputs from console.log shown... ?!

How can i see them? (and yes, "all" is selected in the debugging console)

I also get this error: "Page.getResourceTree failed. ReferenceError: process is not defined"

Re: JS Debugging?

Posted: 06 Jan 2017 20:35
by PoltoS
console.log is ouptuting in log only