Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


There are sections of the code marked #ifdef DEBUG.  How can I properly
enable compiling those sections in?

That depends on the code in question. Such debugging code might in
some cases be code nobody has compiled for years, and bit-rotted, and
not compiling or working any more. This is why we very much should
prefer to make debugging code dependent on DBG_UTIL instead, so that
it gets compiled regularly. (And then if the code is such that it
should not be invoked every time even in a dbgutil build, use some
environment variable to activate it.)

For example, I want to enable DEBUG_ELEMENT in
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx.

I see no DEBUG_ELEMENT in writerfilter in master, you must be looking
at some older branch. Ah yes, that was cleaned last summer:

commit b4e20eed2c9bfc032446a43f08e387a3e613d6b8
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Wed Jun 18 11:30:49 2014 +0200

    writerfilter: Fold all the various DEBUG_* macros into DEBUG_DOMAINMAPPER.

    They were set either all, or none anyway.

If you check the Library_writerfilter.mk in the branch you are looking
at, you will notice that DEBUG_ELEMENT (and all the other DEBUG_FOO)
are defined on the compilation command line if gb_DEBUGLEVEL is higher
than 1. I.e. you need to build writerfilter with 'make writerfilter
dbglevel=2', I think.

--tml

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.