Stepping through the code works okay when you've got only sequential code, but if you have a lot of code sensitive to timers and concurrency, then stepping through the code of one process will mess with all the timers currently running for other processes. As far as I know, there is no debugging facility letting you pause the entire VM at once.<br>

<br><div class="gmail_quote">On Sun, Oct 23, 2011 at 1:31 AM, Kaiduan Xie <span dir="ltr"><<a href="mailto:kaiduanx@gmail.com">kaiduanx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I like and use trace, but my fellow developers are hard-cored JAVA<br>
developers, they want to be able to step through the code.<br>
<font color="#888888"><br>
/Kaiduan<br>
</font><div><div class="h5"><br>
On Sun, Oct 23, 2011 at 1:27 AM, Chandru<br>
<<a href="mailto:chandrashekhar.mullaparthi@gmail.com">chandrashekhar.mullaparthi@gmail.com</a>> wrote:<br>
> On 21 October 2011 17:30, Kaiduan Xie <<a href="mailto:kaiduanx@gmail.com">kaiduanx@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> We need to debug an Erlang server running in an embedded system where<br>
>> no GUI is available. We can attach an Erlang shell to the server from<br>
>> a remote box with GUI. Can we use debugger on GUI box to remote debug<br>
>> the server on embedded system? Can someone share the experience?<br>
>><br>
><br>
> You can use the in built trace facilities? I personally use dbg whenever I<br>
> need to look at a running system and figure out what is happening. Some care<br>
> is needed on what parts of the system you trace to make sure you don't swamp<br>
> the system with traces. I have rendered a few systems unsuable because of<br>
> the volume of tracing if the wrong trace pattern is chosen :) I typically<br>
> use something like this:<br>
><br>
> dbg:tracer(port, dbg:trace_port(file, "trace_file.dbg")).<br>
> dbg:p(all,call).<br>
> dbg:tp(module, function, dbg:fun2ms(fun(_) -> return_trace() end)).<br>
><br>
> Traces will now start to be written to the file trace_file.dbg<br>
><br>
> Once you've collected enough traces:<br>
> dbg:ctp().<br>
> dbg:flush_trace_port().<br>
><br>
> You can then examine the trace file (binary file) using commands in dbg. I<br>
> use the attached module to convert it to plain text.<br>
><br>
> Or you can take a look at redbug: <a href="https://code.google.com/p/eper/" target="_blank">https://code.google.com/p/eper/</a><br>
><br>
> cheers<br>
> Chandru<br>
><br>
><br>
</div></div><div><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>