Skip to content

Debugging and running spec tests

miohtama edited this page May 20, 2012 · 2 revisions

Running a single spec file

 node --debug node_modules/jasmine-node/bin/jasmine-node --coffee --verbose spec/object_directives.spec.coffee 

Debugging .spec files with node, node inspector and coffeescript

Install

npm install node-inspector

Start node-inspector on background

node_modules/node-inspector/bin/inspector.js &

Connect your web browser to http://0.0.0.0:8080/debug?port=5858 <http://0.0.0.0:8080/debug?port=5858>_. Use WebKit based browser (Chrome).

Run jasmine-node with node debugger breaking in on the first line

node --debug-brk node_modules/jasmine-node/bin/jasmine-node --coffee --verbose spec

Press Refresh in the web browser. Now your web browser should be in the active debugging sessions.

Press Run in the top left corner.

The debugger stops in the first debugger; statement in your CoffeeScript code.

Clone this wiki locally