Download the PHP package martino/kirby-debug-toggle without Composer

On this page you can find all versions of the php package martino/kirby-debug-toggle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby-debug-toggle

Debug Toggle for Kirby 5

A Kirby 5 CMS panel plugin that provides a safe, time-limited debug mode toggle with automatic expiry and git-safe flag file management.

License Kirby

Features

Demo

Why this exists

The built-in Kirby workarounds for toggling debug mode didn't fully fit my needs. So I built this for myself. It does exactly what I need and nothing more. If it fits yours too, feel free to use it.

Installation

Manual Installation

  1. Download and extract the plugin to site/plugins/debug-toggle/
  2. The plugin structure should be:

Composer Installation

Configuration

⚠️ Required: Add the following to your site/config/config.php:

Important: The debug closure is required for the plugin to work. Without it, the panel UI will appear but debug mode won't actually activate when toggled.

Panel Auto-Debug: By default, debug mode is automatically enabled in the panel for authorized users (even when the toggle is OFF). This prevents panel corruption from hiding errors. You can disable this by setting 'Martino.debug-toggle.panel-auto-debug' => false.

Configuration Options

Martino.debug-toggle.expiry-hours

Type: int
Default: 4

Number of hours until debug mode automatically disables.

Martino.debug-toggle.permission

Type: string|callable
Default: 'admin'

Controls who can access and toggle debug mode.

Options:

  1. 'admin' - Only users with admin status (uses isAdmin())

  2. Role name - Only users with specific role

  3. Custom callback - Custom permission logic

Martino.debug-toggle.panel-auto-debug

Type: bool
Default: true

Automatically enables debug mode in the panel for authorized users, even when the toggle is OFF.

Why this exists: If the panel breaks due to an error, you need debug mode to see what went wrong. With this enabled, authorized users always see panel errors, preventing you from being locked out.

Behavior:

Usage

  1. Log in to the Kirby panel as an authorized user
  2. Click Debug in the sidebar menu
  3. Click Turn ON to enable debug mode
  4. Debug mode will automatically disable after the configured expiry time
  5. Click Turn OFF to manually disable debug mode

Panel Interface

The debug toggle interface displays:

How It Works

Flag File System

The plugin uses a flag file at site/config/.debug_enabled to control debug mode:

Benefits:

Security

API Routes

The plugin provides two API endpoints:

GET /api/debug-toggle/state

Returns current debug state and metadata.

Response:

POST /api/debug-toggle/state

Toggles debug mode on or off.

Request:

Response: Same as GET endpoint

Requirements

Troubleshooting

Debug toggle menu not visible

Debug mode not working

Permission denied errors

Development

File Structure

Helper Functions

The plugin provides these helper functions:

License

MIT License - Copyright (c) 2026 João Martino / nonverbal

See LICENSE file for details.

Author

João Martino
nonverbal
nonverbalclub.pt

Support

For issues, questions, or contributions, please visit the GitHub repository.

Questions or doubts:


Made with ❤️ for the Kirby community


All versions of kirby-debug-toggle with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package martino/kirby-debug-toggle contains the following files

Loading the files please wait ...