erlang debug

http://www.cnblogs.com/goldli/archive/2011/03/08/1976998.html

erlang 模块文件

helloworld.erl         

文件内容:

-module(helloworld). //文件名与模块名一致
-export([run/1]).     //(导出只有一个参数的RUN函数函数)
run(Name)->          //函数体
io:format("Hello World ~w~n",[Name]).

  

shell 中进行相关命令 编绎,调用,调试

编绎:

 c(helloworld,[debug_info]).   //编绎后,带调试信息文件,用于调试器调试

 

调用:

 helloworld:run(1).              //调用helloworld中的run函数

 

调试:

debugger:start().            //调试器起动

 

posted @ 2015-10-30 13:41  zengkefu  阅读(206)  评论(0编辑  收藏  举报