Adds useful debug features to your Electron app
86
Create a wrapper module for an Electron application that simplifies the setup and usage of development debugging tools. The module should provide convenient functions to initialize debugging capabilities and open DevTools programmatically.
Create a module in debug-wrapper.js that exports:
Debug Initialization: A function initDebug(options) that sets up debugging tools with custom configuration. It should accept an options object and enable automatic DevTools opening on new windows.
DevTools Toggle: A function toggleDevTools(window) that toggles the DevTools panel for a specified browser window. If no window is provided, it should operate on the currently focused window.
DevTools Opening: A function openDevTools(window) that explicitly opens the DevTools panel for a specified browser window, or the focused window if none is provided.
Create tests in debug-wrapper.test.js:
When initDebug() is called with options, the debugging tools should be initialized and configured according to the provided options.
When toggleDevTools() is called with a valid browser window, the DevTools should toggle between open and closed states for that window.
When openDevTools() is called with a valid browser window, the DevTools should open for that window (or remain open if already open).
Provides debugging and inspection utilities for Electron applications.
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