-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running erlang code only startup a console #113
Comments
The only weird things I see is: code server did not start in time for [email protected] |
How do you test that your function is called at startup? io:format is not a reliable way to do that. |
ok, you are right on this, thank you. I am playing with eunit/coverage/tracing and until now I wasn't able to make anything works. If the console output is not reliable how am I supposed to see the output of eunit tests ? |
I tried debugging with an external module with the command: erl -pa /opt/eclipse/plugins/org.erlide.tracing.ttbe_0.1.6.201304230851/ebin -n-pa /opt/eclipse/plugs/org.erlide.kernel.debugger_0.20.1.201304230851/ebin -name dummy -setcookie dummy The first time I debug the module everything works fine. But the second time the external node shows the error: =ERROR REPORT==== 19-May-2013::20:27:42 === Error in process <0.452.0> on node '[email protected]' with exit value: {badarg,[{erlang,register,[erlide_builder,<0.454.0>],[]},{erlide_batch,start,2,[]},{erlide_kernel_common,startup,4,[]}]} Then the next time it works and son on and so on. |
I will comment a little more tomorrow, but when you use a startup function, you need to start a new node every time in order to run it. The debug workflow is: start node, [] enter your "foo:bar().", check result or have the breakpoint trigger, correct code in editor, save (which compiles and reloads the code) and go to [] . Don't start the node every time. If you have to do it, make sure you stop the previous instance. |
For an external module, you may want to restart the node from scratch, then like I said: stop the previous console. This will stop the debugger and it will not crash next time you start. It's not obvious what one should do, so I created https://erlide-tools.assembla.com/spaces/erlide/tickets/1216 to track the issue. Thanks! |
System: Ubuntu 12.10 64 bits, Eclipse 3.8 with erlide release and Erlang R16B.
When running, debugging or getting the coverage of an erlang module, erlide only startup a console. If the function is run form the started console it works fine but the function is not called automatically.
The erlang application is correctly configured with module, function and arguments, and when eclipse is requested to run it no exception are shown in the console:
The same happens when configuring only the module and function without arguments.
The text was updated successfully, but these errors were encountered: