Reputation: 65
Trying to add new helpers to docpad.coffee
I'd like to debug these.
Having setup node inspector as outlined in http://docpad.org/docs/debug I expected the console to show logs when used with e.g.
getOutDir: (inPath) ->
console.log('inPath')
How to set breakpoints to helper methods in docpad.coffee? How to log from docpad.coffee?
Upvotes: 1
Views: 367
Reputation: 13788
The instructions on docpad.org for node-inspector are incorrect (they are being worked on). You can't just run docpad-debug
because that runs the globally installed version of docpad which confuses the debugger. Instead run the local copy of docpad-debug from your node-modules folder:
./node_modules/.bin/docpad-debug run
Upvotes: 3
Reputation: 65
How to log from docpad.coffee?
docpad.log("info", "... your log info here ...")
Other log levels are "warn" and "error".
Upvotes: 1