Closed maximvl closed 10 years ago
I am also having problems with binaries in RTP trace patterns
This is a flaw in the redbug match spec compiler. I will definitely fix this. Unfortunately, the OTP documentation is a bit vague on binaries in match specs :<
for the brave, a quick hack to address this can be found in the "binaries_in_rtp" branch.
On Mon, Jul 7, 2014 at 9:43 AM, Maxim V notifications@github.com wrote:
I'm trying to debug cowboy requests, and watch particular header values, but what i get is
redbug:start("cowboyreq:header(<<\"origin\">>, ) -> return"). {bad_type,{bin,[{bin_element,1, {string,1,"origin"}, default,default}]}}
redbug:start("cowboyreq:header(<<\"origin\">>, ) -> return"). {{badmatch,{more,{erl_scan_continuation,[],no_col, [{'\',1}, {'<<',1}, {'(',1}, {atom,1,header}, {':',1}, {atom,1,cowboy_req}], 1, {erl_scan,#Fun
,false,false,false}, {" . ) ,>>\"nigiro"," . ) ,>>\"\nigiro",1,no_col}, Fun
}}}, {parse_body,"cowboyreq:header(<<\"origin\">>, ) -> return"}, [{redbug_msc,'-body_fun/1-fun-0-',1, [{file,"src/redbug_msc.erl"},{line,168}]}, {redbug_msc,assert,2, [{file,"src/redbug_msc.erl"},{line,237}]}, {redbug_msc,parse,1, [{file,"src/redbug_msc.erl"},{line,142}]}, {redbug_msc,transform,1, [{file,"src/redbug_msc.erl"},{line,18}]}, {redbug,chk_trc,2,[{file,"src/redbug.erl"},{line,518}]}, {lists,foldl,3,[{file,"lists.erl"},{line,1261}]}, {redbug,pack,1,[{file,"src/redbug.erl"},{line,469}]}, {redbug,do_start,1,[{file,"src/redbug.erl"},{line,317}]}]}
I found no examples with binaries or strings in documentation. so how can I make spec with them?
— Reply to this email directly or view it on GitHub https://github.com/massemanet/eper/issues/25.
fixed in 0.86.0
Seems to work now, thanks !
I'm trying to debug cowboy requests, and watch particular header values, but what i get is
I found no examples with binaries or strings in documentation. so how can I make spec with them?