4
正如你可能知道,它现在可以通过使用短形式跟踪二郎功能:跟踪二郎功能 - 短形式
dbg:tpl(Module, Function, x).
而不是通常的:
dbg:tpl(Module, Function, dbg:fun2ms(fun(_) -> exception_trace() end)).
实际上,我想知道return_trace()
是否有类似的简写形式。喜欢的东西:
dbg:tpl(Module, Function, r).
相反的:
dbg:tpl(Module, Function, dbg:fun2ms(fun(_) -> return_trace() end)).
的dbg
模块中的源代码似乎暗示不:
new_pattern_table() ->
PT = ets:new(dbg_tab, [ordered_set, public]),
ets:insert(PT,
{x,
term_to_binary([{'_',[],[{exception_trace}]}])}),
ets:insert(PT,
{exception_trace,
term_to_binary(x)}),
PT.
但我可能是错的。你知道吗?
你可能想使用'dbg'包装:http://github.com/eproxus/erlang_user_utilities (无耻自我推销) – 2010-03-15 09:03:01
感谢分享。它似乎很有用... – 2010-03-15 10:09:08
漂亮的包装;让生活更简单! – 2010-03-15 12:30:22