# clawrock/magento2-debug

> Magento 2 debug module based on Magento 1 Profiler with some extra features.

`composer require clawrock/magento2-debug`

Canonical URL: https://packagento.com/clawrock/magento2-debug

## At a glance

- **Vendor**: clawrock (https://packagento.com/clawrock.md)
- **Latest version**: 2.2.1 — released 2026-06-25
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/clawrock/magento2-debug and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require clawrock/magento2-debug:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 debug module based on Magento 1 Profiler with some extra features.

## README

[![Packagist](https://img.shields.io/packagist/v/clawrock/magento2-debug.svg)](https://packagist.org/packages/clawrock/magento2-debug)
[![Packagist](https://img.shields.io/packagist/dt/clawrock/magento2-debug.svg)](https://packagist.org/packages/clawrock/magento2-debug)
[![Build Status](https://github.com/clawrock/magento2-debug/actions/workflows/ci.yaml/badge.svg)](https://github.com/clawrock/magento2-debug/actions)

## Magento 2 - Debug module
Module for debugging Magento 2 performance. It works without overwriting any core files and it can be installed with composer.

### Installation
1. Enable developer mode `php bin/magento deploy:mode:set developer`
2. Install module via composer `composer require clawrock/magento2-debug`
3. Register module `php bin/magento setup:upgrade`
4. Enable profiler in configuration: `Stores -> Configuration -> Advanced -> Debug`
5. Enable DB profiler `php bin/magento debug:db-profiler:enable`

### Configuration
All settings have only default scope and config type pool is set to environment for better integration with `php bin/magento app:config:dump`

### Compatibility
* Magento >= 2.4.4
* PHP >= 8.1

### Profiler collectors
- Ajax
- Cache
- Config
- Customer
- Database
- Events
- Layout
- Memory
- Models
- Plugins
- Request/Response
- Performance
- Translations
    
### Additional features
- [Whoops error handler](http://filp.github.io/whoops/)

### Credits
- [Magento 1.x Web Profiler](https://github.com/ecoco/magento_profiler)
- [Symfony WebProfilerBundle](https://github.com/symfony/web-profiler-bundle)

## Recent Versions

| Version | Released |
|---|---|
| 2.2.1 | 2026-06-25 |
| 2.2.0 | 2025-11-12 |
| 2.1.4 | 2023-01-31 |
| 2.1.3 | 2023-01-23 |
| 2.1.2 | 2023-01-02 |
| 2.1.1 | 2023-01-02 |
| 2.1.0 | 2023-01-02 |
| 2.0.3 | 2019-05-22 |
| 2.0.2 | 2019-04-03 |
| 1.0.0 | 2019-01-03 |

Showing 10 of 13 versions. Full release history on https://packagento.com/clawrock/magento2-debug.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| filp/whoops | ^2.1 |
| jdorn/sql-formatter | ^1.2 |
| magento/framework | ~103.0 |
| magento/module-backend | ~102.0 |
| magento/module-developer | ^100.4 |
| php | >=8.1 |
| symfony/stopwatch | ^2.8 \|\| ^3.0 \|\| ^4.0 \|\| ^5.0 \|\| ^6.0 \|\| ^7.0 |
| symfony/var-dumper | * |

### Require (dev)

| Package | Constraint |
|---|---|
| bitexpert/phpstan-magento | ^0.31.0 |
| dealerdirect/phpcodesniffer-composer-installer | ^0.7.1 |
| magento/magento-coding-standard | * |
| phpcompatibility/php-compatibility | ^9.3 |
| phpmd/phpmd | ^2.9.1 |
| phpstan/phpstan | ^1.11 |
| phpstan/phpstan-phpunit | ^1.1.1 |
| phpunit/phpunit | ^9.6.33 |
| sebastian/phpcpd | ^6.0.3 |
| slevomat/coding-standard | ~6.4.1 |
| squizlabs/php_codesniffer | ~3.7.2 |

## Quality

Latest release (2.2.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | not tested | – |
| 2.4.9 | – | – | not tested | not tested |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 96 | 96 warnings (ruleset: Magento2) |
| PHPMD | Warning | 16 | 16 rule violations (MissingImport:11, IfStatementAssignment:4, TooManyPublicMethods:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | 1 | – | – |
| 2.4.8 | – | 46 | Error | – |
| 2.4.9 | – | – | Error | Error |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["clawrock/magento2-debug"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

clawrock is a Magento 2 vendor on Packagento. See https://packagento.com/clawrock.md for their full catalogue.

