ExDebugger v0.1.3 ExDebugger.Manual View Source

use ExDebugger.Manual provides convenience macros that users can employ at strategic places in their code base when they feel that the default behaviour of use ExDebugger is not sufficient.

Turning functionality on/off is managed by: your_project_path/debug_options.exs, similarly to use ExDebugger

The following macros are provided:

  • dd/2: First argument denotes the piped_value and second argument a specific label for the very same reason you would:
    value
    |> IO.inspect(label: :some_label)
  • dd/3: Same as dd/2, with an extra argument to force output. This allows users to leave the settings under your_project_path/debug_options.exs unmolested while quickly checking something.

The benefit of these being macros is that all the strategic places in which users employ debugging statements can remain in place without this taking an extra toll on when they need to deploy to production. By switching off all the relevant settings under: your_project_path/debug_options.exs, occurrences of these macros are compile time replaced by their value without any side effects.