Re: tried to follow your instructions for distel debugging
"Roberto Saccon" <[email protected]> Tue, 10 Jul 2007 19:03:25 -0300
| Newsgroups | gmane.comp.lang.erlang.distel.devel |
|---|---|
| Message-ID | <[email protected]> |
thanks very much, after adding the "NetInfo Manager.app" and /etc/hosts stuff it worked. Roberto On 7/10/07, Bill Clementson <[email protected]> wrote: > Hi Roberto, > > On 7/10/07, Roberto Saccon <[email protected]> wrote: > > thanks for the reply, see my answers inline > > > > On 7/10/07, Bill Clementson <[email protected]> wrote: > > > 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. > > > > Oh, I tweaked the error report to make it look consistent with my > > description, but messed it up, but I actually did the whole thing with > > foo@localhost and skast@localhost separately and I got the same > > behaviour, as described. So this is not the problem. > > > > > > > > 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). > > > > > > > I entered foo@localhost, is that ok ? I can connect to the node and > > e.g. reload modules but I am on a mac, and hostname resolves to > > roberto-saccons-computer.local. And the prompt when I start yaws in > > interactive mode looks as follow: > > > > (foo@roberto-saccons-computer)1> > > > > but I cannot connect to foo@roberto-saccons-computer (e.g. reloading > > modules fails) > > > > Might here be buried somewhere the reason that I cannot debug ? > > Did you follow the mac-specific instructions in the INSTALL file: > ============================================================ > > Special notes for Mac OSX: > > David Wallin reports the following procedure to setup Distel to work > on an OSX machine with no network connection: > > 1. Start NetInfo Manager.app (in /Applications/Utilities) > 2. From NetInfo Manager, select the directory path > "/machines/localhost" and mark property "name" and (and anytime > before here: click on the lock and enter the password) choose > "Append Value" from the "Directory" menu. > 3. Enter your machine name as the appended value and Save. > > This procedure is like putting "127.0.0.1 <hostname>" into /etc/hosts > on a UNIX machine. It's necessary so that Emacs can open sockets to > the localhost via the hostname part of a nodename without talking to > DNS. > ============================================================ > > I also use distel on a mac. When I was initially setting up distel, I > think I did the "NetInfo Manager.app" change but that I still had > problems communicating with erlang nodes so subsequently modified the > /etc/hosts file. For example, my machine name is "bc" and the relevant > entries in my /etc/hosts file are: > > 127.0.0.1 localhost > 255.255.255.255 broadcasthost > ::1 localhost > 127.0.0.1 bc > > If you make the changes with "NetInfo Manager.app" or modify the > /etc/hosts file, does that help? > > -- > > Bill Clementson > -- Roberto Saccon ------------------------------------------------------------------------- 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/