Skip to content

Instantly share code, notes, and snippets.

@technicalpickles technicalpickles/inspector
Last active Aug 10, 2017

What would you like to do?
hubot with debugging
set -e
for opt in $* ; do
case "$opt" in
--debug) hubot_debug="coffee --nodejs --debug";;
if [ -n "$hubot_debug" -a "$NODE_ENV" != "development" ] ; then
unset hubot_debug
exec ${hubot_debug} node_modules/.bin/hubot "$@"

Debugging Hubot

Javascript and coffeescript can be hard, and writing hubot scripts even harder. If you are stumped with what hubot is actually doing, you can use node-inspector to poke around.

To get started:

The debugger starts you in node_modules/hubot/bin/hubot, but you can broese up to the hubot root directory, and then into scripts to get at the our scripts.

Unfortunately, the contents of scripts in node-inspector seems to be the compiled javascript, rather than coffeescript, but it is better than nothing.

node-inspector --web-port=8081

This comment has been minimized.

Copy link

SeanFromIT commented Aug 10, 2017

bin/hubot --debug no longer works in latest version. They seem to have changed a lot of stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.