Cheiron
Cheiron

Reputation: 3746

How to deterimine if debugging in Qt

I am working with Linux and Qt. I want to compile certain code only if we are debugging. In Windows I am used to doing the following:

#ifdef _DEBUG
..code...
#endif

This however does not work. I am compiling the debug build and not the release build. What is the way to not compile certain pieces of code in release, but compile them when debug build?

Upvotes: 2

Views: 213

Answers (1)

Leo Chapiro
Leo Chapiro

Reputation: 13979

#ifdef QT_DEBUG

..code...

#endif

Upvotes: 3

Related Questions