sindresorhus/electron-debug

Allow applying debug() to already existing windows

Open

#92 geöffnet am 10. Juni 2025

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (56 Forks)user submission
enhancementhelp wanted

Repository-Metriken

Stars
 (776 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Since debug only works for future windows, it would be nice to apply the configuration in a retroactive way, so it doesn't depend on the call order (i.e. debug() is called from a plugin or extension out of control).

It also provides another improvement: when using windowSelector it would allow to filter by window reference, not by only its attributes, so this will be possible:

const win = createWindow();
debug({ windowSelector: (w => w === win) });

Implementation would be at the same level than registering the listener for future windows, but iterating on the already existing windows.

Contributor Guide