redbug

所属分类:调试/Bug
开发工具:Erlang
文件大小:0KB
下载次数:0
上传日期:2023-04-21 15:57:01
上 传 者sh-1993
说明:  erlang跟踪调试器,
(erlang tracing debugger,)

文件列表:
.travis.yml (123, 2023-04-21)
LICENSE (1071, 2023-04-21)
Makefile (574, 2023-04-21)
SEQ.md (4176, 2023-04-21)
bin/ (0, 2023-04-21)
bin/release.sh (1152, 2023-04-21)
doc/ (0, 2023-04-21)
doc/dtop.edoc (331, 2023-04-21)
doc/overview.edoc (7575, 2023-04-21)
doc/start.edoc (2708, 2023-04-21)
rebar.config (264, 2023-04-21)
rebar.config.script (1357, 2023-04-21)
rebar.lock (4, 2023-04-21)
src/ (0, 2023-04-21)
src/redbug.app.src (226, 2023-04-21)
src/redbug.erl (24137, 2023-04-21)
src/redbug_compiler.erl (8397, 2023-04-21)
src/redbug_dtop.erl (30404, 2023-04-21)
src/redbug_lexer.xrl (3084, 2023-04-21)
src/redbug_parser.yrl (4852, 2023-04-21)
src/redbug_targ.erl (17111, 2023-04-21)
test/ (0, 2023-04-21)
test/bread.erl (4250, 2023-04-21)
test/redbug_compiler_eunit.erl (15629, 2023-04-21)
test/redbug_dist_eunit.erl (3918, 2023-04-21)
test/redbug_eunit.erl (6196, 2023-04-21)
test/replay_trc.erl (2565, 2023-04-21)

[![Build Status](https://travis-ci.org/massemanet/redbug.svg?branch=master)](https://travis-ci.org/massemanet/redbug) DESCRIPTION redbug is a tool to interact with the Erlang trace facility. It will instruct the Erlang VM to generate so-called 'trace messages' when certain events (such as a particular function being called) occur. It uses a safe subset of the tracing functionality, and exits if it feels overloaded, e.g. if it gets flooded by trace messages. It runs in the background, collecting trace messages, until it reaches one of its termination criteria (number of messages/file size or elapsed time). The trace messages are either printed (i.e. human readable) to a file or to the screen; or written to a trc file. Using a trc file puts less stress on the system, but there is no way to count the messages (so the 'msgs' opt is ignored), and the files can only be read by special tools (such as 'bread'). Printing and trc files cannot be combined. By default (i.e. if the 'file' opt is not given), messages are printed. DOCUMENTATION Run `rebar3 edoc` or check the online docs at [hexdocs](https://hexdocs.pm/redbug/). EXAMPLES Basic call trace 1> redbug:start("erlang:demonitor"). % 18:27:21 <0.188.0>({erlang,apply,2}) % erlang:demonitor(#Ref<0.2419348116.2832203778.12948>) % 18:27:21 <0.188.0>({erlang,apply,2}) % erlang:demonitor(#Ref<0.2419348116.2832203777.10938>, [flush]) % 18:27:21 <0.188.0>({erlang,apply,2}) % erlang:demonitor(#Ref<0.2419348116.2832203777.10939>, [flush]) % 18:27:21 <0.188.0>({erlang,apply,2}) % erlang:demonitor(#Ref<0.2419348116.2832203777.10940>, [flush]) redbug done, timeout - 4 As above, but also print return value. The return value is a separate message. 2> redbug:start("erlang:demonitor->return",[{msgs,2}]). {75,2} % 18:31:15 <0.188.0>({erlang,apply,2}) % erlang:demonitor(#Ref<0.2419348116.2832203780.10535>) % 18:31:15 <0.188.0>({erlang,apply,2}) % erlang:demonitor/1 -> true redbug done, msg_count - 1 As above, also print the call stack. Note that not all functions in the call chain are on the stack, only functions we will return to (this is a consequence of tail call optimization.) 3> redbug:start("erlang:demonitor->return,stack",[{msgs,2}]). {75,2} % 18:32:54 <0.188.0>({erlang,apply,2}) % erlang:demonitor(#Ref<0.2419348116.2832203778.13012>) % redbug:block_a_little/0 % redbug:start/2 % erl_eval:do_apply/6 % shell:exprs/7 % shell:eval_exprs/7 % shell:eval_loop/3 % 18:32:54 <0.188.0>({erlang,apply,2}) % erlang:demonitor/1 -> true redbug done, msg_count - 1

近期下载者

相关文件


收藏者