diff --git a/dev/tests/acceptance/tests/_bootstrap.php b/dev/tests/acceptance/tests/_bootstrap.php
index a3d7b41f397a38b5e7a3e0cfaeeac932ecffc622..78d69c1ce9ff540b0debd6b0e1b05fa158c5671d 100644
--- a/dev/tests/acceptance/tests/_bootstrap.php
+++ b/dev/tests/acceptance/tests/_bootstrap.php
@@ -24,7 +24,7 @@ if (file_exists(PROJECT_ROOT . '/.env')) {
 defined('FW_BP') || define('FW_BP', PROJECT_ROOT . $RELATIVE_FW_PATH);
 
 // add the debug flag here
-$debug_mode = $_ENV['MFTF_DEBUG'] ?? false;
-if (!$debug_mode) {
+$debug_mode = (bool)$_ENV['MFTF_DEBUG'] ?? false;
+if (!$debug_mode && extension_loaded('xdebug')) {
     xdebug_disable();
 }