diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index f1e6612..0974850 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -648,6 +648,35 @@ function system_requirements($phase) {
     }
   }
 
+  // Check if xdebug.max_nesting_level is too low, as it crashes some pages.
+  $xdebug_nesting_level = 256;
+  if (extension_loaded('xdebug') && ini_get('xdebug.max_nesting_level') < $xdebug_nesting_level) {
+    // Report on where the correct ini file is to the user.
+    $ini_scanned_files = php_ini_scanned_files();
+    $ini_location = php_ini_loaded_file();
+    if ($ini_scanned_files !== FALSE) {
+      $ini_files = explode(',', $ini_scanned_files);
+      foreach ($ini_files as $value) {
+        if (strpos($value, 'xdebug.ini') !== FALSE) {
+          $ini_location = trim($value);
+          break;
+        }
+      }
+    }
+
+    $description = t('A max_nesting_level lower than @level will cause some pages in your Drupal site to crash. To fix this it is recommended to set xdebug.max_nesting_level=@level in your PHP configuration for Xdebug.', array('@level' => $xdebug_nesting_level));
+    if ($ini_location !== FALSE) {
+      $description .= ' ' . t('Your Xdebug configuration can be modified in @ini_location.', array('@ini_location' => $ini_location));
+    }
+
+    $requirements['xdebug_max_nesting_level'] = array(
+      'title' => t('Xdebug settings'),
+      'value' => t('xdebug.max_nesting_level is set to %value.', array('%value' => ini_get('xdebug.max_nesting_level'))),
+      'description' => $description,
+      'severity' => REQUIREMENT_ERROR,
+    );
+  }
+
   return $requirements;
 }
 
