sindresorhus/electron-debug

Allow applying debug() to already existing windows

Open

#92 创建于 2025年6月10日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)JavaScript (56 fork)user submission
enhancementhelp wanted

仓库指标

Star
 (776 star)
PR 合并指标
 (30 天内没有已合并 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.

贡献者指南