We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 41786ec + 9bdc6b7 commit 5b3a6a7Copy full SHA for 5b3a6a7
src/controller/ApplicationController.tsx
@@ -56,6 +56,7 @@ class ApplicationController<
56
state: State & { _tempObservable: any };
57
cancelTokens: Record<string, any>;
58
proxiedThis: any;
59
+ _debug = Debug(`controller:${this.constructor.name}`);
60
61
constructor() {
62
this.id = randomId();
@@ -281,6 +282,16 @@ class ApplicationController<
281
282
Object.defineProperty(this.prototype, key, descriptor);
283
});
284
}
285
+
286
+ /**
287
+ * Output to debugger with the controller name. Set localStorage.debug to
288
+ * 'controller:*' or 'controller:MyController' to see debug output.
289
+ *
290
+ * @param args messages to log
291
+ */
292
+ debug(...args: any[]) {
293
+ this._debug(...args);
294
+ }
295
296
297
/**
0 commit comments