diff --git a/index.html b/index.html index 26df23866..cf4bc1b36 100644 --- a/index.html +++ b/index.html @@ -486,6 +486,7 @@ @@ -3289,6 +3290,42 @@

Utility

Backbone.$ = require('jquery'); +

+ debugInfodebugInfo(); +
+ In the unfortunate event that you need to submit a + bug + report, this function makes it easier to provide detailed information + about your setup. It prints a JSON object with version information about + Backbone and its dependencies through console.debug. It also + returns this object in case you want to inspect it in code. +

+ +

+ debugInfo comes in a separate module that ships with + the edge version and releases later than 1.5.0. + It is available in UMD format under the same prefix + as backbone.js, but with debug-info.js as the file name. + It is also experimentally available in ES module format + under backbone/modules/. +

+ +
+  <!-- browser embeds -->
+  <script src="some-path-or-url/backbone.js"></script>
+  <script src="some-path-or-url/debug-info.js"></script>
+  <script>
+    Backbone.debugInfo();
+  </script>
+
+  // CommonJS
+  require('backbone/debug-info.js')();
+
+  // ESM
+  import debugInfo from 'backbone/modules/debug-info.js';
+  debugInfo();
+
+

F.A.Q.