diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php
index f8722c436f13ff5a8d2d77c4da29b1b67974ef4a..a6ea0ffae8ee39615ec8de16402798aa58b28920 100644
--- a/module/VuFind/src/VuFind/Bootstrapper.php
+++ b/module/VuFind/src/VuFind/Bootstrapper.php
@@ -147,12 +147,17 @@ class Bootstrapper
     }
 
     /**
-     * Initialize dynamic debug mode.
+     * Initialize dynamic debug mode (debug initiated by a ?debug=true parameter).
      *
      * @return void
      */
     protected function initDynamicDebug()
     {
+        // Query parameters do not apply in console mode:
+        if (Console::isConsole()) {
+            return;
+        }
+
         $app = $this->event->getApplication();
         $sm = $app->getServiceManager();
         $debugOverride = $sm->get('Request')->getQuery()->get('debug');