You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to list all targets that are available for debug.
I would suggest a list of the strings used:
const debugFactory = require('debug');
var a = debugFactory('worker:a');
console.log(debugFactory.getAllAvailableTargets());
// result:
// [ "worker:a" ]
// or
// [ "worker", "worker:a" ]
I have read the comments of the #255, that is suggesting that it would be a memory leak. Is that so? If we cache the "keys" and not the objects, I don't think that it would be a memory leak?
I could submit a PR if this idea is accepted.
The text was updated successfully, but these errors were encountered:
If this is just for debugging purposes, require('debug').names will give you the list of regexes that match the enabled namespaces.
Otherwise, this would be storing strings indefinitely, which might leak given the current implementation. #678 has more information about that, and #425 currently discusses .enable() a bit more too.
I'll consider this but right now it's not something I want to support until v5.
Hello
I would like to list all targets that are available for debug.
I would suggest a list of the strings used:
I have read the comments of the #255, that is suggesting that it would be a memory leak. Is that so? If we cache the "keys" and not the objects, I don't think that it would be a memory leak?
I could submit a PR if this idea is accepted.
The text was updated successfully, but these errors were encountered: