gs debugger

Claes Wikstrom klacke@REDACTED
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

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
2> int:i(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

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: klacke.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <>

More information about the erlang-questions mailing list