Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Erlang
branch: master

This branch is 4 commits ahead of JonGretar:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
EMakefile
README.markdown
user_default.erl

README.markdown

A collection of handy user utilities for the Erlang shell. Read this blog post for background.

sync()              %   compiles all files in Emakefile and load into
                    %     current shell
reload()            %   reload loaded modules
reload_then(Fun)    %   reload then exec a function
git(String)         %   run git command
tc_avg(M, F, A, N)  %   run timer:tc(M, F, A) N times and return range,
                    %     average and median results skipping the first
                    %     run.

Debugger helper functions:

dbg()               %   start the debugger (done automatically for all
                    %     calls)
dbg(c)              %   clear all traces

dbg(M)              %   trace on module M
dbg(M, O)           %   trace on module M with options O
dbg(M, F)           %   trace on function M:F
dbg(M, F, O)        %   trace on function M:F with options O
dbg(M, F, A)        %   trace on function M:F(A)
dbg(M, F, A, O)     %   trace on function M:F(A) with options O

The options for debugging are:

c                   %   clear
r                   %   show return trace (including exceptions).
l                   %   trace on local functions
lr                  %   trace on local functions with return trace 
                    %     (including expections)

Add the following to ~/.erlang to enable them:

code:load_abs("/Path/To/erlang_user_utilities/user_default").
Something went wrong with that request. Please try again.