Adds useful debug features to your Electron app
86
Build a keyboard shortcut manager for an Electron application that registers global keyboard shortcuts for common development operations. The manager must properly handle Electron app initialization timing.
The manager must properly handle the asynchronous Electron app initialization process. Keyboard shortcuts must only be registered after the app is fully ready to accept global shortcuts. The initialization function should work correctly even if called before the app has finished initializing.
Implement two global keyboard shortcuts:
CommandOrControl+R): Reloads the currently focused browser window, ignoring the cacheF12): Opens or closes the developer tools for the currently focused browser windowBoth shortcuts should target the currently focused browser window. If no window is focused, the shortcuts should safely do nothing.
@generates
/**
* Initialize and register keyboard shortcuts for the Electron app
* Must handle async app initialization properly
*/
function initializeShortcuts() {
// IMPLEMENTATION HERE
}
module.exports = {
initializeShortcuts
};Provides the Electron application framework including app lifecycle, BrowserWindow management, and global shortcut APIs.
Install with Tessl CLI
npx tessl i tessl/npm-electron-debugdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10