<p>No they are orthogonal. <code>--enable-debug</code> creates unoptimized binaries which are more usable when you're trying to attach a debugger (e.g. gdb, lldb). It is unrelated to debug output. Debug output is controlled at runtime using <code>-debug=X</code> flags.</p>
<p>Thanks to the individuals who answered this on IRC.</p>

CC BY-SA 4.0
2022-09-26T19:37:35.180Z
Just a small elaboration on `--enable-debug`: it also enables more runtime checking. If all you need is the ability to run a debugger, consider specifying `./configure CXXFLAGS='-O0 -g3'`.
Larry Ruane
CC BY-SA 4.0
2021-12-29T12:50:32.853Z
2021-12-29T12:50:32.853Z
Michael Folkson
<p>Do you need to configure Bitcoin Core with <code>--enable-debug</code> to be able to obtain <a href="https://bitcoin.stackexchange.com/questions/66892/what-are-the-debug-categories">detailed debug logs</a> when running bitcoind with <code>-debug=category</code>?</p>

<bitcoin-core-development><debugging><logging>
Do you need a configuration flag to be able to obtain detailed debug logs?
Michael Folkson
# Do you need a configuration flag to be able to obtain detailed debug logs?

(Asked by: username_0 on 2021-12-29)

Do you need to configure Bitcoin Core with `--enable-debug` to be able to obtain [detailed debug logs](https://bitcoin.stackexchange.com/questions/66892/what-are-the-debug-categories) when running bitcoind with `-debug=category`?

**Tags:** bitcoin-core-development, debugging, logging


---

## 1 answers

### Answer by username_0 on 2021-12-29. Score: 2 | Accepted answer

No they are orthogonal. `--enable-debug` creates unoptimized binaries which are more usable when you're trying to attach a debugger (e.g. gdb, lldb). It is unrelated to debug output. Debug output is controlled at runtime using `-debug=X` flags.

Thanks to the individuals who answered this on IRC.

> **Comments:**
> **username_1**: Just a small elaboration on `--enable-debug`: it also enables more runtime checking. If all you need is the ability to run a debugger, consider specifying `./configure CXXFLAGS='-O0 -g3'`.  

---

