[erlang-questions] distel-mode with *.beam files separate from source

zambal zambal@REDACTED
Fri May 23 21:04:08 CEST 2008



On May 23, 4:15 pm, Paul Fisher <pfis...@REDACTED> wrote:

> Why doesn't the following, placed in the source file, result in
> debugging information being generated in the .beam file
>
> -compile([export_all, debug_info]).
>
> ?  The export_all works as expected, but the debug_info option does not
> seem to work.
>
> --
> paul

I had the same problem and came to the conclusion that if you use
c(File, Options) instead of c(File) to compile a module, you have to
explicitly set the debug_info as an option in order to compile it with
debug info, even if the -compile(debug_info) attribute is set.

Since the erlang-compile (C-c C-k) command in emacs uses c(File,
Options), the debug attribute flag in modules is ignored. After
looking into erlang.el, I learned that passing a prefix argument to
erlang-compile (so you have to press C-u C-c C-k), it sets the
debug_info option in its call to c(File, Options) and you have a
nicely debugable beam file :-)

However, it would be nice if somebody can confirm that the absence of
debug_info in Options of c(File, Options) indeed overrules the -
compile(debug_info) attribute.

vincent




More information about the erlang-questions mailing list