I'm trying to debug cowboy requests, and watch particular header values, but what i get is
> redbug:start("cowboy_req:header(<<\"origin\">>, _) -> return").
{bad_type,{bin,[{bin_element,1,
{string,1,"origin"},
default,default}]}}
> redbug:start("cowboy_req: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<erl_scan.3.23802282>,false,false,false},
{" . )_ ,>>\"nigiro"," . )_ ,>>\"\\nigiro",1,no_col},
#Fun<erl_scan.29.23802282>}}},
{parse_body,"cowboy_req: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?