shameless self-promoting website
»Rejourn root
Posted Wednesday, 24 November 2010 by Miklos
Tags: en hacking libreoffice

Background: OSL_TRACE() is an internal LibreOffice macro that is like printf(), but it’s only enabled in debug mode. Without it, you would add a debug printf during development:

printf("debug, foo\n");

then you would comment it out when the code started working,:

//printf("debug, foo\n");

then remove the comment when it breaks again, etc.

In the past, if you built a LibreOffice module, then you executed:


inside a module, and in case you wanted debug symbols and such messages you built using:

build debug=t

which increased the debug level to 2 (from 0), where 1 is required for debug symbols, 2 for debug messages. (See the OOo wiki page.)

The recent update, why I’m writing this post: Now this has been changed, and debug=t gives you debug symbols only, but no extra debug output. While this is great in most cases, sometimes you still want the old behaviour to get the debug messages. In that case the solution (as pointed out in the mailing list post) is to use:

build debug=t dbglevel=2

(Hopefully this post will be handy for who missed that post, like I did the first time.)