在 vscode 中同时使用 * 和其他事件激活扩展有什么意义?

What's the point of activating extension with * and other events at the same time in vscode?

我看到人们将 *(启动事件)与其他事件结合使用:

"activationEvents": [
    "*",
    "onCommand:extension.toggleCase"
],

为什么?

根据我的经验,当 运行 命令 VSCode 仍在启动过程中时,添加显式 onCommand 激活事件有助于避免“找不到命令”错误扩展。一些相关链接: