From 4494342b3d923c7a08fa4ce7b4a0073157744aee Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Tue, 19 Sep 2023 16:20:15 +0200 Subject: [PATCH] Document debugInfo --- index.html | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) 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.