I am trying to get my build of QGIS to output the debug messages from calls to QgsDebugMsg. Here's what I have so far:
I've built QGIS configured as RelWithDebugInfo and in the application's Help > About > About window, I see the text: "This copy of QGIS writes debugging output."
In the application's Options > System > Environment Variables window, I've set the environment variables: QGIS_DEBUG = 9 and QGIS_LOG_FILE = C:\Users\USER\Documents\QGIS\log.txt
However, the log file isn't getting created at all. What am I missing?
Answering for QGIS 3.4.1.
These variables are apparently being read too early in the QGIS startup cycle, so it doesn't work if you configure them through Settings > Options > System > Environment Variables.
Instead, you need to set them before QGIS starts. On Linux and macOS, use a command like this:
QGIS_DEBUG=9 QGIS_LOG_FILE=/tmp/qgis.log qgis
On Windows, presumably you'd do something like this in the command prompt:
set QGIS_DEBUG=9
set QGIS_LOG_FILE=C:\Users\USER\Documents\QGIS\log.txt
C:\path\to\qgis\qgis.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With