 core/modules/big_pipe/big_pipe.module       | 12 ++++++++++++
 core/modules/simpletest/src/WebTestBase.php | 11 +++++++++++
 2 files changed, 23 insertions(+)

diff --git a/core/modules/big_pipe/big_pipe.module b/core/modules/big_pipe/big_pipe.module
index 1970c27..4abc2e7 100644
--- a/core/modules/big_pipe/big_pipe.module
+++ b/core/modules/big_pipe/big_pipe.module
@@ -33,6 +33,17 @@ function big_pipe_help($route_name, RouteMatchInterface $route_match) {
  * @see \Drupal\big_pipe\Controller\BigPipeController::setNoJsCookie()
  */
 function big_pipe_page_attachments(array &$page) {
+  $page['#attached']['html_head'][] = [
+    [
+      '#tag' => 'p',
+      '#attributes' => [
+        'route_name' => \Drupal::routeMatch()->getRouteName(),
+        '_no_big_pipe' => \Drupal::routeMatch()->getRouteObject()->getOption('_no_big_pipe') ? 'true' : 'false',
+      ],
+    ],
+    'debug',
+  ];
+
   // Routes that don't use BigPipe also don't need no-JS detection.
   if (\Drupal::routeMatch()->getRouteObject()->getOption('_no_big_pipe')) {
     return;
@@ -48,6 +59,7 @@ function big_pipe_page_attachments(array &$page) {
   // avoid endless redirect loops.
   $has_big_pipe_nojs_cookie = $request->cookies->has(BigPipeStrategy::NOJS_COOKIE);
   $page['#cache']['contexts'][] = 'cookies:' . BigPipeStrategy::NOJS_COOKIE;
+
   if ($session_exists && !$has_big_pipe_nojs_cookie) {
     $page['#attached']['html_head'][] = [
       [
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index e4e9622..e1e88f5 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -2088,6 +2088,17 @@ protected function checkForMetaRefresh() {
         // Parse the content attribute of the meta tag for the format:
         // "[delay]: URL=[page_to_redirect_to]".
         if (preg_match('/\d+;\s*URL=(?<url>.*)/i', $refresh[0]['content'], $match)) {
+          if (strpos($this->getRawContent(), 'big_pipe/no-js')) {
+            $this->fail($this->url);
+            $this->fail('found the damn BigPipe no-js redirect');
+            $this->verbose($this->getRawContent());
+            throw new \Exception('STOP this test run, so that we can look at the response we just logged because that is the key to finding the root cause.');
+          }
+          else {
+            $this->pass('no problem in this redirect');
+            $this->verbose($this->getRawContent());
+          }
+
           $this->metaRefreshCount++;
           return $this->drupalGet($this->getAbsoluteUrl(Html::decodeEntities($match['url'])));
         }
