Re: tried to follow your instructions for distel debugging

"Bill Clementson" <[email protected]> Tue, 10 Jul 2007 08:25:15 -0700
Newsgroups gmane.comp.lang.erlang.distel.devel
Message-ID <[email protected]>
Hi Roberto,

On 7/10/07, Roberto Saccon <[email protected]> wrote:
> You work on distel, your post on the aquamacs and erlang list and your
> blog have been a great help to get me into emacs for erlang
> development. Thanks a lot.

You're welcome - glad you've found my posts useful! :-)

> However, i have one big difficulty I culd not overcome, even after
> reading http://bc.tech.coop/blog/070528.html several times.
>
> How can I debug a yaws web application ?
>
> - I am connecting to the remote node where yaws is running (foo@localhost).
> - I switch to interpreting mode (files are compiled wit debug_info)
> - I set a breakpoint
> - I reload in the browser a page I want to debug
> - The debug process list pops up, there I select the process I want to debug
>
> Now happens what I do not know how to deal with:
>
> the EDB monitor (with the processing list) fills the whole frame, and
> at the bottom at Minibuffer position I can read:
>
>   No buffer for pid [TYPE erl-pid distel_12663@roberto-saccons-computer 7 0 0]
>
>
> And when I check the list of buffers I get this:
>
> .%* *edb skast@localhost*  179  EDB Monitor
>     my_yaws_app.erl     3563  Erlang              ~/code/src/my_yaws_app.erl
>     *scratch*                0  Text
>   * *Messages*            2358  Fundamental
>     *reg group-leader*       0  Fundamental
>   * *derl foo@localhost*   0  Fundamental
>   * *trace foo@localho: 2562  Fundamental
>
>
>
> The debug window as described in your blog post does not appear (nor
> is it listed in the running buffers above). Do you have an idea what
> is going wrong ?

I can think of a number of possibilities:

1. In your description of the problem, you said that you were trying
to connect to "foo@localhost" while the buffer list shows that the
debugger monitor buffer is "*edb skast@localhost*" so distel thinks
that you are debugging the node "skast@localhost". Is this actually
the node that yaws is running on and you used "foo@localhost" just as
an example or did you previously debug some other node? If the latter,
just kill the "*edb skast@localhost*" buffer and retry connecting to
the node "foo@localhost", toggling interpreting and setting a
breakpoint.

2. When you connect to a node for debugging, you should enter the
"long form" of the node name (e.g. - "[email protected]" instead of just
"foo" when you do "C-c C-d n"). This really "shouldn't" be the problem
as there is code in distel to convert short names to long names;
however, for some reason, this sometimes seems to cause a problem for
people (only when debugging).

3. If you are running yaws on Windows and your pc is not configured to
be part of a DNS domain, this can also be a problem (see this thread
for details: http://thread.gmane.org/gmane.comp.lang.erlang.general/22485
 and, most specifically, this post:
http://article.gmane.org/gmane.comp.lang.erlang.general/22549). So, if
#2 above (e.g. - entering "[email protected]") didn't work, try using the
actual IP address instead (e.g. - "[email protected]").

> If you have no time to answer this email, no problem, if you want it
> to answer on your blog or on a mailing list, perfect for me. And again
> thanks very much to get me least that far with aquamacs and distel.

I'm cc'ing the distel mailing list as well. In the event that my above
suggestions don't work, someone else might be able to provide a
solution. And, if the above suggestions do work, they might help
someone else who encounters the same problem. Please feel free to
reply to both my email address and the mailing list with any
followups.

Good luck!

-- 
Bill Clementson

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/