Created
January 4, 2010 14:28
-
-
Save jvantuyl/268539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Start a tracer | |
dbg:tracer(). | |
% Tell it to trace the current process and its children | |
dbg:p(self(), [c,sos]). | |
% Tell it to trace our test function | |
dbg:tpl(testmod,test,2,[]). % Tells it to trace testmod:test/2 | |
% Call module to see test message | |
testmod:test(1,2). | |
% Note that it shows the parameters. You can trace my_server:handle_call to see state of calls. | |
% You can also trace a great many other things besides just calls. Very handy. See the dbg docs. | |
% If you want to go really crazy, the ET module has facilities to graphically inspect traces. Have fun! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(testmod). | |
-export([test/2]). | |
test(_A,_B) -> ok. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment