Skip to main content

DevTools

Weblisk includes a built-in debug overlay for inspecting islands, signals, effects, and performance marks. It's activated by a URL parameter or localStorage — zero cost in production.

Activation

Enable the overlay in any of these ways:

Once activated, the flag persists in localStorage across page navigations. Remove it by clicking the close button or calling destroy().

Setup

js
import { devtools } from 'weblisk/core/devtools.js';

// Install — returns null if debug mode is not active
const dt = devtools();

// Cleanup when done
dt?.destroy();

What It Shows

The overlay displays three panels in real time:

Typical Workflow

js
// In your shell.js — only add devtools in development
import { devtools } from 'weblisk/core/devtools.js';

// Safe to call unconditionally — returns null if ?wl-debug is not set
devtools();

Since the overlay only mounts when the debug flag is present, you can leave the devtools() call in your production code. It's a no-op without the flag.