diff --git a/src/hub.js b/src/hub.js
index 6153285d108a339594861a9216481cbfcd0df0e4..2b88247d07249c836adf7c72c7aefb5f38841803 100644
--- a/src/hub.js
+++ b/src/hub.js
@@ -6,6 +6,12 @@ import { patchWebGLRenderingContext } from "./utils/webgl";
 patchWebGLRenderingContext();
 
 import "aframe-xr";
+
+// HACK: this has to run after A-Frame but before our bundle, since A-Frame blows away the local storage setting
+if (/[&?]debug=true/.test(window.location.search) && typeof localStorage !== "undefined") {
+  localStorage.debug = "naf-janus-adapter:*";
+}
+
 import "./vendor/GLTFLoader";
 import "networked-aframe/src/index";
 import "naf-janus-adapter";