|
|
| Author |
Message |
< Erlang ~ node() result, Distel and debuggnig |
| Bill M. |
Posted: Mon Jun 09, 2008 3:46 am |
|
|
|
User
Joined: 06 Jun 2008
Posts: 24
Location: New York
|
Hello All:
I've been trying to get a posting to show up on the forums or the news groups, please forgive me if this is a dupe.
I use Erlang on Linux using Xemacs and Distel.
In Distel (and in fact the standard Erlang mode too),
using Compile generates an Erlang shell in an Xemacs buffer,
which has a compile command injected into its initiation.
This part works, but as someone who is not really skilled
in Erlang or elisp, I'm not sure how to fix the following issue.
The node(). command in any shell (even erl run in a terminal window) gives the reply nonode@nohost. I can neither get the node and host name to change to something more appropriate, nor can I attach to this node. Can anyone recommend a good howto/tutorial that is up to date and complete with respect on how to fix this, or give me a trick to correct it? Although io:format() is useful, I'd like to give the debugger a try.
Thanks:
Bill M. |
|
|
| Back to top |
|
| marstein |
Posted: Fri Jun 27, 2008 11:05 pm |
|
|
|
Joined: 25 Jun 2008
Posts: 3
Location: Palo Alto, CA, USA
|
In my .emacs file I find the following:
Code: ;; Some Erlang customizations
(add-hook 'erlang-mode-hook
(lambda ()
;; when starting an Erlang shell in Emacs, default in the node name
(setq inferior-erlang-machine-options '("-sname" "emacs"))
;; add Erlang functions to an imenu menu
(imenu-add-to-menubar "imenu")))
you can also probably use the -setcookie parameter. |
|
|
| Back to top |
|
| Bill M. |
Posted: Thu Jul 03, 2008 2:35 pm |
|
|
|
User
Joined: 06 Jun 2008
Posts: 24
Location: New York
|
Thanks, that was helpful, I now get a emacs@linux-y6ws for a nodename. Now that I'm past that I've got a few more questions.
1) I want to use the debugger, and according to the Distel User's manual, any module I want to debug should be compiled with debug_info. I tried to configure this via the environment variable documented under compile, as follows:
export ERL_COMPILER_OPTIONS=debug_info
maniatty@linux-y6ws:~/src> !xe
xemacs *.erl &
[1] 31388
In xemacs I selected erlang->compile and got the normal response
Eshell V5.5.5 (abort with ^G)
(emacs@linux-y6ws)1> c("/home/myuserid/securebackup/src/erlang/DLCrypt/dlmath", [{outdir, "/home/myuserid/src/"}]).
{ok,dlmath}
(emacs@linux-y6ws)2>
However the expected debug_info flag set in the environment variable was not in the list of compiler options, so I'm not sure if my attempt to activate debugging information in the code genearation succeeded. Is there a way I can check to see if debugging information was actually embedded in the generated code?
2) When I go to attach to emacs@linux-y6ws, I get no complaints at erlang->Distel->Specify which node to connect to, however, I do notice that when I try to say profile an expression, and I invoke a function in one of my modules, that I get an error
Symbol's function definition is void: memql
I tried profiling a function from one of my modules which failed and I tried an expression like (3 + 2) and I still got that error. I can understand the debugger not working given the current compiler settings, but I thought fprof required no special compiler options, so I expected at least that operation to succeed.
In summary, although I'm further along, I still can't use the distel debugger. Ideally the distel debugger should probably have a real nice short sweet howto like the traditional erlang debugger does at:
http://oneless.blogspot.com/2007/04/starting-erlang-debugger.html |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|