PHPackages                             bitbabit/magento2-dev-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. bitbabit/magento2-dev-tools

ActiveMagento2-module[Database &amp; ORM](/categories/database)

bitbabit/magento2-dev-tools
===========================

Advanced developer tools for Magento 2 with dynamic control and visualization

1.2.0(10mo ago)1241MITJavaScriptPHP ^8.1|^8.2|^8.3

Since Jul 18Pushed 9mo agoCompare

[ Source](https://github.com/bitbabit/magento2-dev-tools)[ Packagist](https://packagist.org/packages/bitbabit/magento2-dev-tools)[ Docs](https://github.com/bitbabit/magento2-dev-tools)[ RSS](/packages/bitbabit-magento2-dev-tools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

BitBabit Developer Tools for Magento 2
======================================

[](#bitbabit-developer-tools-for-magento-2)

[![Latest Stable Version](https://camo.githubusercontent.com/3b807733ce21775181a14ab96ff4e2ed563eb78da7a71e90a684cbd8cccc0eef/68747470733a2f2f706f7365722e707567782e6f72672f62697462616269742f6d6167656e746f322d6465762d746f6f6c732f762f737461626c65)](https://packagist.org/packages/bitbabit/magento2-dev-tools)[![Total Downloads](https://camo.githubusercontent.com/7938cd5ba57e6ae7c8e04da1a8af46392f7aa73f7f6687a5beece997ce8e3649/68747470733a2f2f706f7365722e707567782e6f72672f62697462616269742f6d6167656e746f322d6465762d746f6f6c732f646f776e6c6f616473)](https://packagist.org/packages/bitbabit/magento2-dev-tools)[![License](https://camo.githubusercontent.com/d39e81d4c4d7fbe1b69a8e3d479b5725ee65c8ac162388fd45c8362395050815/68747470733a2f2f706f7365722e707567782e6f72672f62697462616269742f6d6167656e746f322d6465762d746f6f6c732f6c6963656e7365)](https://packagist.org/packages/bitbabit/magento2-dev-tools)[![PHP Version Require](https://camo.githubusercontent.com/ecedc95e04eaa6b1b600adca3daeca2cccd3eabeb716d54298ba4791735e2053/68747470733a2f2f706f7365722e707567782e6f72672f62697462616269742f6d6167656e746f322d6465762d746f6f6c732f726571756972652f706870)](https://packagist.org/packages/bitbabit/magento2-dev-tools)[![Magento](https://camo.githubusercontent.com/437cfc1b81efcfabfa3ed1558bbc4a626af17030913de1034d6601b268ef91a0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6167656e746f2d322e342b2d6f72616e67652e737667)](https://magento.com)[![GitHub Stars](https://camo.githubusercontent.com/c59cba91af86fd2b3b4e90134fdabab0b40d08757e7d867c994e9ecd79528242/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f62697462616269742f6d6167656e746f322d6465762d746f6f6c732e737667)](https://github.com/bitbabit/magento2-dev-tools/stargazers)[![GitHub Issues](https://camo.githubusercontent.com/1989ae29392c5f1000bbbed8952f3142d61c351e4c3e899fae697142f1f131a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f62697462616269742f6d6167656e746f322d6465762d746f6f6c732e737667)](https://github.com/bitbabit/magento2-dev-tools/issues)

Overview
--------

[](#overview)

BitBabit Developer Tools is a comprehensive development and debugging suite for Magento 2 that provides real-time performance monitoring, database query profiling, and advanced debugging capabilities. It features a modern, interactive web-based toolbar similar to Symfony's DebugBar or Laravel Debugbar.

Key Features
------------

[](#key-features)

### 🔍 **Database Query Profiling**

[](#-database-query-profiling)

- Real-time SQL query monitoring with execution times
- Slow query detection and highlighting
- Query parameter binding visualization
- Query type analysis (SELECT, INSERT, UPDATE, DELETE)
- Comprehensive query statistics

### ⚡ **Performance Monitoring**

[](#-performance-monitoring)

- Application execution time tracking
- Memory usage monitoring (current, peak, real usage)
- Bootstrap time measurement
- Server load monitoring
- OPcache status and statistics

### 🛡️ **Security &amp; Authentication**

[](#️-security--authentication)

- API key-based authentication system
- Secure header validation (`X-Debug-Api-Key`)
- Developer mode restrictions
- Cookie-based session management

### 🌐 **Request Analysis**

[](#-request-analysis)

- HTTP request/response monitoring
- Header inspection
- Parameter analysis (GET, POST, FILES)
- Session data examination
- AJAX request interception

### 🖥️ **Environment Information**

[](#️-environment-information)

- PHP version and configuration
- Server software details
- Operating system information
- PHP extensions listing
- Timezone and locale settings

### 🐛 **Advanced Debugging**

[](#-advanced-debugging)

- Multi-level debug logging (info, warning, error, debug)
- Contextual debug messages
- Interactive JSON tree visualization
- Real-time message collection

### 📱 **Interactive Web Interface**

[](#-interactive-web-interface)

- Modern, responsive toolbar widget
- Real-time data updates
- Collapsible panels
- Multi-request tracking
- Mobile-friendly design

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require bitbabit/magento2-dev-tools
bin/magento module:enable BitBabit_DeveloperTools
bin/magento setup:upgrade
php bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
```

If the package is not yet published to Packagist, you can install with explicit version:

```
composer require bitbabit/magento2-dev-tools:^1.2.0
bin/magento module:enable BitBabit_DeveloperTools
bin/magento setup:upgrade
php bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
```

### Manual Installation

[](#manual-installation)

1. Download the module files
2. Extract to `app/code/BitBabit/DeveloperTools/`
3. Run the following commands:

```
bin/magento module:enable BitBabit_DeveloperTools
bin/magento setup:upgrade
php bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
```

Quick Setup
-----------

[](#quick-setup)

After installation, follow these steps to get started:

```
# Enable the profiler
bin/magento bitbabit:profiler:enable

# Generate API key for frontend widget
bin/magento bitbabit:devtools:generate-api-key

# Copy the generated API key for frontend widget usage

# Clear cache
bin/magento cache:flush
```

### Monolithic Frontend Widget Activation

[](#monolithic-frontend-widget-activation)

To enable the profiler widget and save the API key to cookies for persistent profiling:

```
https://YOUR_FRONTEND_URL?api_key=YOUR_GENERATED_API_KEY

```

This will:

- Enable the profiler widget on your frontend
- Save the API key to cookies for automatic profiling on subsequent requests
- Allow you to see the profiler widget on all pages

**Note**: Boot time and memory management features are currently under development, so data may not be 100% accurate.

Configuration
-------------

[](#configuration)

### Admin Configuration

[](#admin-configuration)

Navigate to **Stores → Configuration → BitBabit → Developer Tools**

#### Basic Settings

[](#basic-settings)

- **Enable Developer Tools**: Master toggle for the entire module
- **Profiler Header Key**: HTTP header to trigger profiling (default: `X-Debug-Mode`)
- **Enable HTML Output**: Show profiler data for web requests
- **Enable JSON Injection**: Inject profiler data into API responses
- **Developer Mode Only**: Restrict profiling to developer mode
- **Slow Query Threshold**: Highlight queries exceeding this time (ms)
- **Toolbar Widget**: Enable/disable the floating toolbar
- **Memory Limit**: Auto-disable threshold to prevent memory issues

#### API Security Settings

[](#api-security-settings)

- **Enable API Key Validation**: Require API key for access
- **API Key**: Encrypted storage of the authentication key

### Console Commands

[](#console-commands)

#### Enable/Disable Profiler

[](#enabledisable-profiler)

```
# Enable profiler
bin/magento bitbabit:profiler:enable

# Disable profiler
bin/magento bitbabit:profiler:disable

# Check status
bin/magento bitbabit:profiler:status
```

#### API Key Management

[](#api-key-management)

```
# Generate new API key
bin/magento bitbabit:devtools:generate-api-key

# Regenerate existing API key
bin/magento bitbabit:devtools:generate-api-key --regenerate
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

1. **Enable the module** in admin configuration
2. **Generate an API key** using the console command
3. **Configure your browser** to send the debug header:
    - Header: `X-Debug-Api-Key`
    - Value: Your generated API key
4. **Visit any frontend page** to see the toolbar

### Browser Extension Integration

[](#browser-extension-integration)

The module is designed to work with browser extensions that can inject custom headers:

```
// Example browser extension configuration
headers: {
  'X-Debug-Mode': '1',
  'X-Debug-Api-Key': 'your-generated-api-key'
}
```

### Programmatic Debug Logging

[](#programmatic-debug-logging)

```
