gs debugger

Claes Wikstrom <>
Mon Sep 12 22:58:32 CEST 2005


Per Einar Strömme wrote:
> s
> 
> 
> 
>           Hej Klacke  !
> 

>    If the "gs debugger" is the one started using "debugger:start()."
> then this is how I use it:
> 

Hmmm still unclear.

Look at this session, it's a combination of the unix and the erlang shell

# cat b.erl
-module(b).
-compile(export_all).

foo() ->
     5 + 2.

# erlc +debug_info b.erl
# erl
Erlang (BEAM) emulator version 5.4.6 [source] [hipe]

Eshell V5.4.6  (abort with ^G)
1> im().   %% pops up the debugger GUI
<0.32.0>
2> int:i(b).
{module,b}


%% at this point I chose a breakpoint with the GUI at
%% the line 5 + 2
%% I also click Options->Auto Attach->On Break
%%
3> b:foo().

%% Fine, I get a breakpoint at the 5+2 line and
%% all is fine, Click continue

%% in another unix shell

# emacs b.erl
# cat b.erl
-module(b).
-compile(export_all).

foo() ->
     55 + 25.

# erlc +debug_info b.erl

Back to the erlang shell

4> l(b).

..... ahhh see it's always a good thing to write
down stuff, everything gets clearer then.
It sems as if I call

 > l(Mod).

I still execute the old interpreted code, but my
breakpoints disappear, whereas if I
a) make sure the processes die Process->Kill and
b) 5> int:i(Mod).

I get to keep the breakpoints and also get
the new code. Still confusing but better ...

I thought that loading interpreted code with c:l/1
did the right thing (I seem to remember that it did
many years ago ... but maybe my memory fails me ....)

Also, reloading with

7> int:i(Mod).

without killing the old process is probably what
really confused me since it then looks simply as if the
breakpoint disapears.



/klacke











-------------- next part --------------
A non-text attachment was scrubbed...
Name: klacke.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050912/f929c5e6/attachment.vcf>


More information about the erlang-questions mailing list