massemanet/eper

Idea and some more questions: only print last message

mattiasw2 opened this issue · 2 comments

When a function calls fails, I typically use redbug to trace a function higher in the call stack to see why it was called and how.

In this cases, often, only the last call is relevant. Since redbug anyway uses a buffer, maybe, redbug could hold the printing for a second or so, and then print.

Other questions:

  • conf file, or should I just edit redbug.erl for my own defaults?
  • I can only trace 1 place, when I try to add a 2nd pattern, it says already started, any workaround?

for question 1, try the "blocking" flag? (see redbug:help/0)
for question 2; conf file... I'll put it on the potential improvements list.
for q3, the first arg to redbug:start is really a list of trace patterns, like this;
redbug:start(["erlang:element(2,_)","erlang:now->return"]).

  1. blocking, missed that. Yes, you are right, if number of traces not huge, this works fine.
  2. Perfect!