diff --git a/core/includes/common.inc b/core/includes/common.inc
index d05ee0c..d44f5ee 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2827,10 +2827,10 @@ function _drupal_flush_css_js() {
  *   Label to prefix the data.
  * @param $print_r
  *   Flag to switch between print_r() and var_export() for data conversion to
- *   string. Set $print_r to TRUE when dealing with a recursive data structure
- *   as var_export() will generate an error.
+ *   string. Set $print_r to FALSE to use var_export() instead of print_r().
+ *   Passing recursive data structures to var_export() will generate an error.
  */
-function debug($data, $label = NULL, $print_r = FALSE) {
+function debug($data, $label = NULL, $print_r = TRUE) {
   // Print $data contents to string.
   $string = String::checkPlain($print_r ? print_r($data, TRUE) : var_export($data, TRUE));
 
diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php
index d2949a6..71b0e89 100644
--- a/core/modules/simpletest/src/Tests/SimpleTestTest.php
+++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php
@@ -196,7 +196,7 @@ function stubTest() {
     $this->assertNothing();
 
     // This causes the debug message asserted in confirmStubResults().
-    debug('Foo', 'Debug');
+    debug('Foo', 'Debug', FALSE);
   }
 
   /**
