Equivalent of Python if __debug__

In Python there is a feature for simple print style debugging to be switched on or off.
If you run a Python script with the -O option then

if __debug__:
      print variable, variable, variable

Is there an equivalent in Julia? I know you could set a constant to be true or false, bt that involves editing the code to switch on/off the debug lines.

See Logging · The Julia Language.

1 Like

This may interest you too: @assert alternatives?

Thankyou both