[Android] chromium - How to detect debug mode ( build in debug ) in C/C++

87 views
Skip to first unread message

Khương Duy Nguyễn

unread,
Oct 13, 2015, 10:29:14 PM10/13/15
to Chromium-dev
Hi all,
I am dev chromium android.
I have some methods in C++ ( chrome_resource_dispatcher_host_delegate.cc ).  But i want it run only on release mode.
How to detect Debug Mode in C++?

Thanks!

Anton Vayvod

unread,
Oct 14, 2015, 4:33:02 AM10/14/15
to Khương Duy Nguyễn, Chromium-dev
The usual way in Chromium (and perhaps in C++ in general) is to check for NDEBUG macro:

#ifdef NDEBUG
// release only code
#endif

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Reply all
Reply to author
Forward
0 new messages