Skip to main content

W0041 - Usage of debugging function

Error​

-module(main).
-export([main/0]).

main() ->
re~dbug:start("io:format/2->return", []).
%% ^^^^^^^^^^^^ 💡 error: Debugging functions should only be used during local debugging and usages should not be checked in.

Explanation​

It is common to use debugging or tracing functions while troublehooting code locally. These functions are usually not meant to be used in production code, but they can still be checked-in by mistake.

This linter raises an error when it detects the usage of a debugging function.

It is possible to silence a specific instance of this linter by prepending:

% elp:ignore W0041 - An optional explanation here