First, make sure you have the compile flag (+debug_info) set when compiling your source, then fire up the debugger:

1> i:im(). 

My Erlang Makefile:

EBIN_DIR := ebin
SRC_DIR := src
EXAMPLES_DIR := examples
INCLUDE_DIR := include
ERLC := erlc
ERLC_FLAGS := +debug_info +native -W -I $(INCLUDE_DIR) -o $(EBIN_DIR)

all:
	@mkdir -p $(EBIN_DIR)
	$(ERLC) $(ERLC_FLAGS) $(SRC_DIR)/*.erl

clean:
	@rm -rf $(EBIN_DIR)/*
	@rm -f erl_crash.dump

Read up on the Erlang docs.

The debugger can be a bit weird in that it doesn’t always find your ebin directory (if you’re compiling to a separate ebin dir)… it took me a bit to figure out. Also on the Mac it seems to either crash or not launch timetimes.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>