[erlang-questions] Tracing and debugging

Vlad Dumitrescu vladdu55@REDACTED
Tue Jan 13 15:31:33 CET 2015


On Tue, Jan 13, 2015 at 3:22 PM, Loïc Hoguin <essen@REDACTED> wrote:

> On 01/13/2015 03:18 PM, Vlad Dumitrescu wrote:
>
>> Some more advanced stuff can be done too, like only
>> tracing variables whose values have changed.
>>
>
> Curious what you mean by that?
>
>
I mean that for the following code

{A, B} = {a, b},
{B, C} = {b, c}

the simplistic approach would trace A and B after the first expression and
B and C after the other. But B has the same value and it's useless to
output it again.

If the implementation could be done efficiently enough, this could even
detect "chain updates" and present them as changes to a single
meta-variable. So

S = #rec{},
S1= S#rec{a=1},
S2=S1#rec{b=2}

might not output the potentially large record each time, but only the
changed values. This is probably something better done offline, as it's a
presentation thing. I am thinking out loud, basically, so thanks for
challenging me.

regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150113/108e7b3f/attachment.htm>


More information about the erlang-questions mailing list