sindresorhus/electron-debug

Allow applying debug() to already existing windows

Open

#92 aperta il 10 giu 2025

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (56 fork)user submission
enhancementhelp wanted

Metriche repository

Star
 (776 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor