# Does Julia have something like #ifdef in C++ for conditional compile

**URL:** https://discourse.julialang.org/t/does-julia-have-something-like-ifdef-in-c-for-conditional-compile/44721
**Category:** General Usage
**Tags:** question
**Created:** [August 11, 2020, 1:50am UTC](https://discourse.julialang.org/t/does-julia-have-something-like-ifdef-in-c-for-conditional-compile/44721 "2020-08-11T01:50:05Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [August 11, 2020, 6:53am UTC](https://discourse.julialang.org/t/does-julia-have-something-like-ifdef-in-c-for-conditional-compile/44721/4 "2020-08-11T06:53:18Z")

</div>

I asked a similar question related to Python **debug** Hope it helps.

> [@Equivalent of Python if \_\_debug\_\_](https://discourse.julialang.org/t/equivalent-of-python-if-debug/25715):
>
> 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.

---

_[View the full topic](https://discourse.julialang.org/t/does-julia-have-something-like-ifdef-in-c-for-conditional-compile/44721)._
