sindresorhus/electron-debug

Allow applying debug() to already existing windows

オープン

#92 opened on 2025/06/10

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (56 件のフォーク)user submission
enhancementhelp wanted

Repository metrics

Stars
 (776 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

コントリビューターガイド