#nodejs debugging #mocha tests on console and browser

Oscar Brito


For an running example of a mocha nodejs test get:


git clone https://github.com/aetheon/node-project-template.git node-project-template

cd node-project-template


Console debugger:

npm install mocha -g

# run console debugger
node -debug spec/node-js/example.js


Browser Debugger:

npm install node-inpector mocha -g

# debugger is listening on: http://127.0.0.1:8080
node-inspector &

# debugger port is created on 5858
mocha --debug-brk spec/node-js/example.js

# launch  browser on http://127.0.0.1:8080/debug?port=5858 to debug



Have fun...

LINKS:
http://dailyjs.com/2013/08/22/mocha-debugger/



Visit www.divhide.com for more informations, contacts and news about Web Development.
See other blog posts at blog.divhide.com.



Divhide purpose is to follow the HTML5 movement and contribute with applications which prove the quality of technology.


Feel free to contact divhide.