On Fri, Aug 13, 2010 at 12:34, Piotr Dorobisz <piotr.dorob...@erlang-solutions.com> wrote: > Now there shouldn't be this timeout issue - I spawn new erlang process to > collect trace data so stop function returns immediately. But when tracing > many traces will be generated by dbg. I think that they shouldn't be shown as > they just obfuscate results instead of giving any useful information about > application. I'm working on starting tracing from different node and I'd like > to know how can I create it? I suppose that it should be done using > BackendManager rather than by OtpNode constructor. But what arguments should > I pass to createBackend function (especially launch parameter) to get node on > which I could start tracing?
Hi, In order to start another node, you have to use BackendManager.createBackend. (OtpNode will not start a beam process and other ways will not make the beam process die when the Eclipse instance shuts down). But I don't think it would be useful in this case: the node will run on the same machine, so the processing will take just as much. The problem is that we don't want to have to wait for the trace data, but start the processing asynchronously and get notified when it's ready. I think that the way to do it is to update the view in the background using events. Something like this public class TraceEventHandler extends EventHandler { @Override protected void doHandleMsg(final OtpErlangObject msg) throws Exception { final OtpErlangObject event = getStandardEvent(msg, "trace_ttb"); if (event == null) { return; } // ErlLogger.debug("************>>> " + event); // get item from event and add it to the viewer data } } // somewhere in the view handler = new TraceEventHandler(); backend.getEventDaemon().addHandler(handler); %% for the time being this has to be added to erlide_jrpc:init/1 add_service(io_server, JPid), %% use this to send send_event(String, From) -> erlide_jrpc:event(trace_ttb, TraceData). Check how it's done for ProcessEventHandler, which updates the Process list view. regards, Vlad ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Erlide-devel mailing list Erlide-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/erlide-devel