CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-electron-debug

Adds useful debug features to your Electron app

86

1.19x
Overview
Eval results
Files

task.mdevals/scenario-5/

Electron Development Helper

Build a simple command-line tool that launches an Electron application with automatic debug features enabled during development.

Requirements

Your tool should:

  1. Create a minimal Electron application with a single main window
  2. Enable debug features that work automatically without requiring manual configuration
  3. Only activate debug features when running in development mode
  4. Automatically show developer tools when the window opens in development mode
  5. Provide programmatic control to toggle developer tools on/off for the main window

Implementation

@generates

API

/**
 * Initializes and launches the Electron application
 * Sets up automatic debug features for development
 */
function createApp();

/**
 * Toggles developer tools for the main application window
 */
function toggleDevTools();

Test Cases

  • When the app launches in development mode, developer tools should automatically open for the main window @test
  • When toggleDevTools() is called, it should open DevTools if they're closed, and close them if they're open @test
  • When running in production mode (NODE_ENV=production), debug features should be disabled @test

Dependencies { .dependencies }

electron-debug { .dependency }

Provides automatic debug features for Electron applications with zero configuration.

electron { .dependency }

The Electron framework for building desktop applications.

Install with Tessl CLI

npx tessl i tessl/npm-electron-debug

tile.json