All notes
Coff

Debugger

SO: debugging coffeescript.


coffee --nodejs debug yourscript.coffee

# Add "debugger" in coffee source file.

Debugger on hubot

github.com: Debugging Hubot.

Method 1: robot.logger. ie robot.logger.debug, robot.logger.info, robot.logger.error, etc. The default log level is 'info' but you can change with the HUBOT_LOG_LEVEL environment variable.

Method 2: inspect based debugging in development


console.log require('util').inspect thingToDebug

Method 3:


npm install -g node-inspector
node-inspector --no-preload --web-port 8123

# Then, we can insert "debugger" in our code somewhere to setup a breakpoint.
# Then we run Hubot:
npm install -g coffeescript
coffee --nodejs --debug node_modules/.bin/hubot

# Then, we visit http://127.0.0.1:8123/debug?port=5858 in our browser.

Retrospective on how to debug hubot