# Module

> Bootstraps the debug toolbar and the full-page debugger over the active application.

[API reference](/docs/api/index.md) › [Debug](/docs/extensions/debug/reference/index.md) › Module

| class | `yii\debug\Module` |
| --- | --- |
| Extends | [`yii\base\Module`](/docs/api/yii/base/module/index.md) » [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) » [`yii\base\Component`](/docs/api/yii/base/component/index.md) » [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| Implements | [`yii\base\BootstrapInterface`](/docs/api/yii/base/bootstrapinterface/index.md), [`yii\base\Configurable`](/docs/api/yii/base/configurable/index.md) |
| Source | [`src/Module.php`](https://github.com/yii2-extensions/debug/blob/main/src/Module.php#L64) |

Bootstraps the debug toolbar and the full-page debugger over the active application.

Attaches a [`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md) to capture per-request data, registers URL rules for the debugger routes, wires the
toolbar/exception-page injection listeners, and registers the collectors and panels declared in [`$collectors`](/docs/extensions/debug/reference/module/index.md#property-collectors)
and [`$panels`](/docs/extensions/debug/reference/module/index.md#property-panels) (merged on top of the built-in core definitions).

Registration itself is delegated to the services under `yii\debug\service`, which the module resolves through its
own service locator. An application replaces one by registering a definition under the service class name: a class
name, a configuration array carrying `class`, a callable, or a ready-made instance. Every definition but an
instance is built with this module bound to the `module` argument, so a replacement declaring `Module $module`
receives it.

The definition must be in place before the module resolves the service. [`CapturePolicyFactory`](/docs/extensions/debug/reference/service/capturepolicyfactory/index.md),
[`CollectorRegistrar`](/docs/extensions/debug/reference/service/collectorregistrar/index.md), [`PanelRegistrar`](/docs/extensions/debug/reference/service/panelregistrar/index.md), and [`StandaloneActionResolver`](/docs/extensions/debug/reference/service/standaloneactionresolver/index.md) are resolved during
[`init()`](/docs/extensions/debug/reference/module/index.md#method-init) and [`LogTargetFactory`](/docs/extensions/debug/reference/service/logtargetfactory/index.md) during [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap), so replacing those requires the module
`components` configuration; the remaining services may also be replaced later through
[`ServiceLocator::set()`](/docs/api/yii/di/servicelocator/index.md#method-set).

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-actionMap"></span>[`$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap) | `array<string, class-string\|array<string, mixed>>` | Mapping from action IDs to standalone [`Action`](/docs/api/yii/base/action/index.md) class configurations. Default: `[]`. Available since 22.0. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-actionNamespace"></span>[`$actionNamespace`](/docs/api/yii/base/module/index.md#property-actionNamespace) | `string\|null` | The namespace where standalone [`Action`](/docs/api/yii/base/action/index.md) subclasses are located for convention-based discovery, parallel to [`$controllerNamespace`](/docs/api/yii/base/module/index.md#property-controllerNamespace) for controllers. Default: `null`. Available since 22.0. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-aliases"></span>[`$aliases`](/docs/api/yii/base/module/index.md#property-aliases) write-only | `array` | List of path aliases to be defined. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-allowedHosts"></span>`$allowedHosts` | `list<string>` | Hosts allowed to access this module. Each entry is resolved to an IP at runtime; useful for dynamic DNS. Default: `[]`. | `Module` |
| <span id="property-allowedIPs"></span>`$allowedIPs` | `list<string>` | IPs allowed to access this module. Entries may be exact, wildcard (`192.168.0.*`) or CIDR (`172.16.0.0/12`). Default: `['127.0.0.1', '::1']`. | `Module` |
| <span id="property-authManager"></span>`$authManager` | `array<string, mixed>\|`[`yii\rbac\BaseManager`](/docs/api/yii/rbac/basemanager/index.md)`\|string` | RBAC access checker component id or fully configured manager. Default: `'authManager'`. | `Module` |
| <span id="property-basePath"></span>[`$basePath`](/docs/api/yii/base/module/index.md#property-basePath) | `string` | The root directory of the module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-behaviors"></span>[`$behaviors`](/docs/api/yii/base/component/index.md#property-behaviors) read-only | `array<`[`yii\base\Behavior`](/docs/api/yii/base/behavior/index.md)`<static>>` | List of behaviors attached to this component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="property-checkAccessCallback"></span>`$checkAccessCallback` | `callable(`[`yii\base\Action`](/docs/api/yii/base/action/index.md)`\|null): bool\|null` | Callback evaluated by [`checkAccess()`](/docs/extensions/debug/reference/module/index.md#method-checkAccess). Receives the current [`Action`](/docs/api/yii/base/action/index.md) (or `null`) and must return `true` to grant access. Default: `null`. | `Module` |
| <span id="property-collectorCoordinator"></span>`$collectorCoordinator` read-only | `PHPForge\Debug\Collector\CollectorCoordinator` | Configured collector coordinator. | `Module` |
| [`$collectors`](#property-collectors) | `array<array-key, array<string, mixed>\|`[`Closure`](https://www.php.net/manual/en/class.closure.php)`(`[`CapturePolicy`](https://github.com/php-forge/debug-core/blob/b70459f033a1d7a1c5edf7951029aad2061986dd/src/Capture/CapturePolicy.php)`):` [`CollectorInterface`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/CollectorInterface.php)`\|`[`CollectorInterface`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/CollectorInterface.php)`\|string>` | Debug collectors resolved from instances, class names, Yii configuration arrays, or `Closure` factories during [`init()`](/docs/extensions/debug/reference/module/index.md#method-init). Default: `[]`. | `Module` |
| <span id="property-components"></span>[`$components`](/docs/api/yii/di/servicelocator/index.md#property-components) | `array` | The list of the component definitions or the loaded component instances (ID => definition or instance). | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| <span id="property-controllerMap"></span>[`$controllerMap`](/docs/api/yii/base/module/index.md#property-controllerMap) | `array` | Mapping from controller ID to controller configurations. Default: `[]`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-controllerNamespace"></span>[`$controllerNamespace`](/docs/api/yii/base/module/index.md#property-controllerNamespace) | `string\|null` | The namespace that controller classes are in. Default: `null`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-controllerPath"></span>[`$controllerPath`](/docs/api/yii/base/module/index.md#property-controllerPath) | `string` | The directory that contains the controller classes. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-dataPath"></span>`$dataPath` | `string` | Directory storing the debugger data files (path alias accepted). Default: `'@runtime/debug'`. | `Module` |
| <span id="property-debugHeaders"></span>`$debugHeaders` write-only | [`yii\base\Event`](/docs/api/yii/base/event/index.md) | Response event raised after the action ran. | `Module` |
| <span id="property-defaultHeight"></span>`$defaultHeight` | `int` | Debug bar default height, as a percentage of the total screen height. Default: `50`. | `Module` |
| <span id="property-defaultPanel"></span>`$defaultPanel` | `string` | Name of the panel that should be visible when opening the debug panel. Default: `'log'`. | `Module` |
| <span id="property-defaultRoute"></span>`$defaultRoute` |  | Route dispatched when the module is requested without an action segment. Default: `'index'`. | `Module` |
| <span id="property-dirMode"></span>`$dirMode` | `int` | Permission applied to newly created debugger directories (used by [`chmod()`](https://www.php.net/manual/en/function.chmod.php)); no umask is applied. Default: `0700`. | `Module` |
| <span id="property-disableCallbackRestrictionWarning"></span>`$disableCallbackRestrictionWarning` | `bool` | Whether to disable the access-callback restriction warning emitted by [`checkAccess()`](/docs/extensions/debug/reference/module/index.md#method-checkAccess). Default: `false`. | `Module` |
| <span id="property-disableIpRestrictionWarning"></span>`$disableIpRestrictionWarning` | `bool` | Whether to disable the IP restriction warning emitted by [`checkAccess()`](/docs/extensions/debug/reference/module/index.md#method-checkAccess). Default: `false`. | `Module` |
| [`$dispatchers`](#property-dispatchers) | `array<string, string>` | Collector IDs to hand to application components as their PSR-14 dispatcher, `collectorId => componentId`. Default: `[]`. | `Module` |
| <span id="property-enableDebugLogs"></span>`$enableDebugLogs` | `bool` | Whether to keep log messages emitted by debug-module requests. Enable only when debugging the module itself. Default: `false`. | `Module` |
| <span id="property-fileMode"></span>`$fileMode` | `int\|null` | Permission applied to newly created debugger data files (used by [`chmod()`](https://www.php.net/manual/en/function.chmod.php)). Default: `0600`. | `Module` |
| <span id="property-historySize"></span>`$historySize` | `int` | Maximum number of debug data files to keep; older snapshots beyond this count are pruned. Default: `50`. | `Module` |
| <span id="property-id"></span>[`$id`](/docs/api/yii/base/module/index.md#property-id) | `string` | An ID that uniquely identifies this module among other modules which have the same [parent](/docs/api/yii/base/module/index.md#property-module). Default: `null`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-layout"></span>[`$layout`](/docs/api/yii/base/module/index.md#property-layout) | `string\|bool\|null` | The layout that should be applied for views within this module. Default: `null`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-layoutPath"></span>[`$layoutPath`](/docs/api/yii/base/module/index.md#property-layoutPath) | `string` | The root directory of layout files. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-logTarget"></span>`$logTarget` | `array<string, mixed>\|`[`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md)`\|string` | LogTarget instance, configuration array, or class name. Always coerced to a [`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md) by [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap). Default: `'yii\debug\LogTarget'`. | `Module` |
| <span id="property-maxBodyBytes"></span>`$maxBodyBytes` | `int` | Maximum raw request or response body bytes retained by the shared capture policy. Default: `\PHPForge\Debug\Capture\CapturePolicy::DEFAULT_MAX_BODY_BYTES`. | `Module` |
| <span id="property-module"></span>[`$module`](/docs/api/yii/base/module/index.md#property-module) | [`yii\base\Module`](/docs/api/yii/base/module/index.md)`\|null` | The parent module of this module. `null` if this module does not have a parent. Default: `null`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-modules"></span>[`$modules`](/docs/api/yii/base/module/index.md#property-modules) | `array` | The modules (indexed by their IDs). | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-pageTitle"></span>`$pageTitle` | `callable(string): string\|string\|null` | Page title literal string or a callable receiving the base URL and returning a string. Default: `null`. | `Module` |
| <span id="property-panelRegistry"></span>`$panelRegistry` read-only | [`PanelRegistry`](https://github.com/php-forge/debug-core/blob/b70459f033a1d7a1c5edf7951029aad2061986dd/src/Registration/PanelRegistry.php) | Resolved panel catalog. | `Module` |
| <span id="property-panels"></span>`$panels` | `array<string,` [`Panel`](/docs/extensions/debug/reference/panel/index.md)`>` | Debug panels indexed by panel id. May be populated with config arrays / class names before [`initPanels()`](/docs/extensions/debug/reference/module/index.md#method-initPanels) runs, but after initialization the array holds only [`Panel`](/docs/extensions/debug/reference/panel/index.md) instances. Default: `[]`. | `Module` |
| <span id="property-params"></span>[`$params`](/docs/api/yii/base/module/index.md#property-params) | `array` | Custom module parameters (name => value). Default: `[]`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-sensitiveKeyPatterns"></span>`$sensitiveKeyPatterns` | `list<string>\|null` | PCRE patterns applied to complete data keys. `null` enables Debug Core defaults when the default exact-key list is active; `[]` explicitly disables pattern matching. Default: `null`. | `Module` |
| <span id="property-sensitiveKeyPrefixes"></span>`$sensitiveKeyPrefixes` | `list<string>` | Literal, case-insensitive data-key prefixes redacted from every persistent debugger capture. Default: `[]`. | `Module` |
| <span id="property-sensitiveKeys"></span>`$sensitiveKeys` | `list<string>` | Exact, case-insensitive data keys redacted from every persistent debugger capture. Default: `\PHPForge\Debug\Helper\SensitiveDataRedactor::DEFAULT_KEYS`. | `Module` |
| <span id="property-shellContextFactory"></span>`$shellContextFactory` read-only | [`yii\debug\service\ShellContextFactory`](/docs/extensions/debug/reference/service/shellcontextfactory/index.md) | Resolved shell factory. | `Module` |
| <span id="property-skipAjaxRequestUrl"></span>`$skipAjaxRequestUrl` | `array<int\|string, mixed>` | Routes whose AJAX hits should NOT appear in the toolbar history (e.g. polling endpoints). Default: `[]`. | `Module` |
| <span id="property-toolbarHtml"></span>`$toolbarHtml` read-only | `string` | Rendered `<yii-debug-toolbar>` element. | `Module` |
| <span id="property-toolbarPosition"></span>`$toolbarPosition` | `string` | Toolbar position on the page (`'bottom'` or `'upper'`). Default: `'bottom'`. | `Module` |
| <span id="property-traceLine"></span>`$traceLine` | `callable(array<string, mixed>,` [`Panel`](/docs/extensions/debug/reference/panel/index.md)`): string\|false\|string` | Trace-line template placeholder string ({file}, {line}, {text}), callable returning the rendered line, or `false` to disable trace-line rendering entirely. Default: `self::DEFAULT_IDE_TRACELINE`. | `Module` |
| <span id="property-tracePathMappings"></span>`$tracePathMappings` | `array<string, string>` | Maps containerized/remote paths to local paths for the {file} portion of [`$traceLine`](/docs/extensions/debug/reference/module/index.md#property-traceLine); only the first match is applied. Default: `[]`. | `Module` |
| <span id="property-uniqueId"></span>[`$uniqueId`](/docs/api/yii/base/module/index.md#property-uniqueId) read-only | `string` | The unique ID of the module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-urlRuleClass"></span>`$urlRuleClass` | `string` | Class name of the [`UrlRule`](/docs/api/yii/web/urlrule/index.md) used for rules generated by this module. Default: `'yii\web\UrlRule'`. | `Module` |
| <span id="property-version"></span>[`$version`](/docs/api/yii/base/module/index.md#property-version) | `string\|callable\|null` | The version of this module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="property-viewPath"></span>`$viewPath` | `string` | Path containing the framework-neutral Debug Core templates. Default: `'@vendor/php-forge/debug-core/resources/views'`. | `Module` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-__construct"></span>[`__construct()`](/docs/api/yii/base/module/index.md#method-__construct) | Constructor. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-__call"></span>[`__call()`](/docs/api/yii/base/component/index.md#method-__call) | Calls the named method which is not a class method. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-__clone"></span>[`__clone()`](/docs/api/yii/base/component/index.md#method-__clone) | This method is called after the object is created by cloning an existing one. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-__get"></span>[`__get()`](/docs/api/yii/di/servicelocator/index.md#method-__get) | Getter magic method. | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| <span id="method-__isset"></span>[`__isset()`](/docs/api/yii/di/servicelocator/index.md#method-__isset) | Checks if a property value is null. | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| <span id="method-__set"></span>[`__set()`](/docs/api/yii/base/component/index.md#method-__set) | Sets the value of a component property. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-__unset"></span>[`__unset()`](/docs/api/yii/base/component/index.md#method-__unset) | Sets a component property to be null. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-afterAction"></span>[`afterAction()`](/docs/api/yii/base/module/index.md#method-afterAction) | This method is invoked right after an action within this module is executed. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-attachBehavior"></span>[`attachBehavior()`](/docs/api/yii/base/component/index.md#method-attachBehavior) | Attaches a behavior to this component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-attachBehaviors"></span>[`attachBehaviors()`](/docs/api/yii/base/component/index.md#method-attachBehaviors) | Attaches a list of behaviors to the component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| [`beforeAction()`](#method-beforeAction) | Disables the application log targets when [`$enableDebugLogs`](/docs/extensions/debug/reference/module/index.md#property-enableDebugLogs) is `false`, applies the access check, and detaches the toolbar/header listeners so the debugger response is not polluted with self-debug data. | `Module` |
| <span id="method-behaviors"></span>[`behaviors()`](/docs/api/yii/base/component/index.md#method-behaviors) | Returns a list of behaviors that this component should behave as. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| [`bootstrap()`](#method-bootstrap) | Wires the debug log target, the toolbar/header listeners, the error-page injection hook, and the debugger URL rules onto the application. | `Module` |
| <span id="method-canGetProperty"></span>[`canGetProperty()`](/docs/api/yii/base/component/index.md#method-canGetProperty) | Returns a value indicating whether a property can be read. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-canSetProperty"></span>[`canSetProperty()`](/docs/api/yii/base/component/index.md#method-canSetProperty) | Returns a value indicating whether a property can be set. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-className"></span>[`className()`](/docs/api/yii/base/baseobject/index.md#method-className) static | Returns the fully qualified name of this class. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-clear"></span>[`clear()`](/docs/api/yii/di/servicelocator/index.md#method-clear) | Removes the component from the locator. | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| [`createCapturePolicy()`](#method-createCapturePolicy) | Creates the shared persistent-data policy, optionally extending its exact-key list for one collector. | `Module` |
| <span id="method-createController"></span>[`createController()`](/docs/api/yii/base/module/index.md#method-createController) | Creates a controller instance based on the given route. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-createControllerByID"></span>[`createControllerByID()`](/docs/api/yii/base/module/index.md#method-createControllerByID) | Creates a controller based on the given controller ID. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-detachBehavior"></span>[`detachBehavior()`](/docs/api/yii/base/component/index.md#method-detachBehavior) | Detaches a behavior from the component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-detachBehaviors"></span>[`detachBehaviors()`](/docs/api/yii/base/component/index.md#method-detachBehaviors) | Detaches all behaviors from the component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-ensureBehaviors"></span>[`ensureBehaviors()`](/docs/api/yii/base/component/index.md#method-ensureBehaviors) | Makes sure that the behaviors declared in [`behaviors()`](/docs/api/yii/base/component/index.md#method-behaviors) are attached to this component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-get"></span>[`get()`](/docs/api/yii/base/module/index.md#method-get) | Returns the component instance with the specified ID. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getBasePath"></span>[`getBasePath()`](/docs/api/yii/base/module/index.md#method-getBasePath) | Returns the root directory of the module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getBehavior"></span>[`getBehavior()`](/docs/api/yii/base/component/index.md#method-getBehavior) | Returns the named behavior object. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-getBehaviors"></span>[`getBehaviors()`](/docs/api/yii/base/component/index.md#method-getBehaviors) | Returns all behaviors attached to this component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| [`getCollectorCoordinator()`](#method-getCollectorCoordinator) | Returns the validated collector coordinator used by the request log target. | `Module` |
| <span id="method-getComponents"></span>[`getComponents()`](/docs/api/yii/di/servicelocator/index.md#method-getComponents) | Returns the list of the component definitions or the loaded component instances. | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| <span id="method-getControllerPath"></span>[`getControllerPath()`](/docs/api/yii/base/module/index.md#method-getControllerPath) | Returns the directory that contains the controller classes according to [`$controllerNamespace`](/docs/api/yii/base/module/index.md#property-controllerNamespace). | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getInstance"></span>[`getInstance()`](/docs/api/yii/base/module/index.md#method-getInstance) static | Returns the currently requested instance of this module class. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getLayoutPath"></span>[`getLayoutPath()`](/docs/api/yii/base/module/index.md#method-getLayoutPath) | Returns the directory that contains layout view files for this module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| [`getLogTarget()`](#method-getLogTarget) | Returns the initialized [`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md), raising when the module has not been bootstrapped. | `Module` |
| <span id="method-getModule"></span>[`getModule()`](/docs/api/yii/base/module/index.md#method-getModule) | Retrieves the child module of the specified ID. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getModules"></span>[`getModules()`](/docs/api/yii/base/module/index.md#method-getModules) | Returns the sub-modules in this module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| [`getPanelRegistry()`](#method-getPanelRegistry) | Returns the effective panel catalog, which carries the display order and the IDs disabled by configuration. | `Module` |
| [`getShellContextFactory()`](#method-getShellContextFactory) | Returns the factory building the page shell of every debugger action. | `Module` |
| [`getToolbarHtml()`](#method-getToolbarHtml) | Returns the toolbar HTML: a `<yii-debug-toolbar>` custom element wired with data attributes the bundled JS reads. | `Module` |
| <span id="method-getUniqueId"></span>[`getUniqueId()`](/docs/api/yii/base/module/index.md#method-getUniqueId) | Returns an ID that uniquely identifies this module among all modules within the current application. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getVersion"></span>[`getVersion()`](/docs/api/yii/base/module/index.md#method-getVersion) | Returns current module version. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-getViewPath"></span>[`getViewPath()`](/docs/api/yii/base/module/index.md#method-getViewPath) | Returns the directory that contains the view files for this module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| [`getYiiLogo()`](#method-getYiiLogo) static | Returns the Yii logo as a data URI ready to drop into `<img src="…">` or `<link rel="icon">`. | `Module` |
| <span id="method-has"></span>[`has()`](/docs/api/yii/base/module/index.md#method-has) | Returns a value indicating whether the locator has the specified component definition or has instantiated the component. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-hasEventHandlers"></span>[`hasEventHandlers()`](/docs/api/yii/base/component/index.md#method-hasEventHandlers) | Returns a value indicating whether there is any handler attached to the named event. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-hasMethod"></span>[`hasMethod()`](/docs/api/yii/base/component/index.md#method-hasMethod) | Returns a value indicating whether a method is defined. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-hasModule"></span>[`hasModule()`](/docs/api/yii/base/module/index.md#method-hasModule) | Checks whether the child module of the specified ID exists. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-hasProperty"></span>[`hasProperty()`](/docs/api/yii/base/component/index.md#method-hasProperty) | Returns a value indicating whether a property is defined for this component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| [`htmlTitle()`](#method-htmlTitle) | Resolves the page title used in the debugger HTML: the literal [`$pageTitle`](/docs/extensions/debug/reference/module/index.md#property-pageTitle) string when set, the result of the configured callable, or the default `Yii Debugger` label. | `Module` |
| [`init()`](#method-init) | Resolves the [`$dataPath`](/docs/extensions/debug/reference/module/index.md#property-dataPath) alias and instantiates every configured panel. | `Module` |
| [`injectToolbarOnErrorPage()`](#method-injectToolbarOnErrorPage) | Injects the debug toolbar into the rendered HTML of an error page (yiisoft/yii2#7616). | `Module` |
| <span id="method-off"></span>[`off()`](/docs/api/yii/base/component/index.md#method-off) | Detaches an existing event handler from this component. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| <span id="method-on"></span>[`on()`](/docs/api/yii/base/component/index.md#method-on) | Attaches an event handler to an event. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| [`renderToolbar()`](#method-renderToolbar) | Renders the mini-toolbar at the end of the page body. | `Module` |
| [`route()`](#method-route) static | Builds a module-absolute route array for the given debugger action. | `Module` |
| <span id="method-runAction"></span>[`runAction()`](/docs/api/yii/base/module/index.md#method-runAction) | Runs a controller action specified by a route. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-set"></span>[`set()`](/docs/api/yii/di/servicelocator/index.md#method-set) | Registers a component definition with this locator. | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| <span id="method-setAliases"></span>[`setAliases()`](/docs/api/yii/base/module/index.md#method-setAliases) | Defines path aliases. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setBasePath"></span>[`setBasePath()`](/docs/api/yii/base/module/index.md#method-setBasePath) | Sets the root directory of the module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setComponents"></span>[`setComponents()`](/docs/api/yii/di/servicelocator/index.md#method-setComponents) | Registers a set of component definitions in this locator. | [`yii\di\ServiceLocator`](/docs/api/yii/di/servicelocator/index.md) |
| <span id="method-setControllerPath"></span>[`setControllerPath()`](/docs/api/yii/base/module/index.md#method-setControllerPath) | Sets the directory that contains the controller classes. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| [`setDebugHeaders()`](#method-setDebugHeaders) | Sets headers carrying debug data on AJAX responses so the toolbar can resolve the captured tag and link back to the full view. | `Module` |
| <span id="method-setInstance"></span>[`setInstance()`](/docs/api/yii/base/module/index.md#method-setInstance) static | Sets the currently requested instance of this module class. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setLayoutPath"></span>[`setLayoutPath()`](/docs/api/yii/base/module/index.md#method-setLayoutPath) | Sets the directory that contains the layout files. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setModule"></span>[`setModule()`](/docs/api/yii/base/module/index.md#method-setModule) | Adds a sub-module to this module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setModules"></span>[`setModules()`](/docs/api/yii/base/module/index.md#method-setModules) | Registers sub-modules in the current module. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setVersion"></span>[`setVersion()`](/docs/api/yii/base/module/index.md#method-setVersion) | Sets current module version. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-setViewPath"></span>[`setViewPath()`](/docs/api/yii/base/module/index.md#method-setViewPath) | Sets the directory that contains the view files. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| [`setYiiLogo()`](#method-setYiiLogo) static | Sets the logo data URI returned by [`getYiiLogo()`](/docs/extensions/debug/reference/module/index.md#method-getYiiLogo). | `Module` |
| <span id="method-trigger"></span>[`trigger()`](/docs/api/yii/base/component/index.md#method-trigger) | Triggers an event. | [`yii\base\Component`](/docs/api/yii/base/component/index.md) |
| [`checkAccess()`](#method-checkAccess) protected | Returns whether the current request is allowed to access the debugger. | `Module` |
| [`coreActionMap()`](#method-coreActionMap) protected | Built-in standalone actions dispatched through [`Module::$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap), keyed by action ID. | `Module` |
| [`coreCollectors()`](#method-coreCollectors) protected | Built-in collectors paired by stable ID with their presentation panels. | `Module` |
| [`corePanels()`](#method-corePanels) protected | Returns the built-in panel configurations, ordered as the request itself unfolds. | `Module` |
| [`createStandaloneAction()`](#method-createStandaloneAction) protected | Resolves a debugger endpoint from [`Module::$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap) before falling back to convention-based discovery. | `Module` |
| [`defaultVersion()`](#method-defaultVersion) protected | Returns the default module version string. | `Module` |
| [`initActionMap()`](#method-initActionMap) protected | Hands the built-in, panel-declared, and configured standalone actions to [`StandaloneActionResolver`](/docs/extensions/debug/reference/service/standaloneactionresolver/index.md) and stores the merged map on [`Module::$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap). | `Module` |
| [`initCollectors()`](#method-initCollectors) protected | Hands the built-in and configured collector definitions to [`CollectorRegistrar`](/docs/extensions/debug/reference/service/collectorregistrar/index.md) and stores the resolved collectors with the coordinator driving them. | `Module` |
| [`initPanels()`](#method-initPanels) protected | Hands the built-in and configured panel definitions to [`PanelRegistrar`](/docs/extensions/debug/reference/service/panelregistrar/index.md) and stores the resolved panels with the catalog describing their display order. | `Module` |
| [`initPanelServices()`](#method-initPanelServices) protected | Registers every enabled panel in the module service locator under its own class and each ancestor class below [`Panel`](/docs/extensions/debug/reference/panel/index.md). | `Module` |
| [`resetGlobalSettings()`](#method-resetGlobalSettings) protected | Resets application-wide settings the debugger should not inherit from the host application (currently the asset bundles registry). | `Module` |
| <span id="method-runMappedAction"></span>[`runMappedAction()`](/docs/api/yii/base/module/index.md#method-runMappedAction) protected | Runs a standalone action registered in [`$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap). | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="method-runStandaloneAction"></span>[`runStandaloneAction()`](/docs/api/yii/base/module/index.md#method-runStandaloneAction) protected | Runs a standalone [`Action`](/docs/api/yii/base/action/index.md) instance through the standard module/action event lifecycle. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| [`setDebuggerResponseHeaders()`](#method-setDebuggerResponseHeaders) protected | Applies the debugger response hardening policy. | `Module` |

## Events

| Event | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="event-EVENT_BEFORE_ACTION"></span>[`EVENT_BEFORE_ACTION`](/docs/api/yii/base/module/index.md#event-EVENT_BEFORE_ACTION) | [`yii\base\ActionEvent`](/docs/api/yii/base/actionevent/index.md) | An event raised before executing a controller action. Event name: `'beforeAction'`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |
| <span id="event-EVENT_AFTER_ACTION"></span>[`EVENT_AFTER_ACTION`](/docs/api/yii/base/module/index.md#event-EVENT_AFTER_ACTION) | [`yii\base\ActionEvent`](/docs/api/yii/base/actionevent/index.md) | An event raised after executing a controller action. Event name: `'afterAction'`. | [`yii\base\Module`](/docs/api/yii/base/module/index.md) |

## Constants

| Constant | Value | Description | Defined by |
| --- | --- | --- | --- |
| <span id="const-DEFAULT_IDE_TRACELINE"></span>`DEFAULT_IDE_TRACELINE` | `\PHPForge\Debug\Helper\Trace::DEFAULT_TEMPLATE` | Default [`$traceLine`](/docs/extensions/debug/reference/module/index.md#property-traceLine) template: the shared `ide://` deep link that IDE extensions resolve into "open file at line". | `Module` |
| <span id="const-SOURCE_PATH"></span>`SOURCE_PATH` | `'@vendor/php-forge/debug-core/resources/assets'` | Default source path for the framework-neutral Debug Core assets. The framework adapter may override this to provide a different path. | `Module` |
| <span id="const-VIEW_PATH_ALIAS"></span>`VIEW_PATH_ALIAS` | `'@yiiDebugViews'` | Adapter-owned alias for the shared Debug Core templates. | `Module` |

## Property details

### $collectors <span id="property-collectors"></span>

```php
public array<array-key, array<string, mixed>|Closure(PHPForge\Debug\Capture\CapturePolicy): PHPForge\Debug\CollectorInterface|PHPForge\Debug\CollectorInterface|string> $collectors = []
```

Debug collectors resolved from instances, class names, Yii configuration arrays, or `Closure` factories during
[`init()`](/docs/extensions/debug/reference/module/index.md#method-init).

Collectors derive their own IDs; register them as a list or under a key that matches [`CollectorInterface::id()`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/CollectorInterface.php#L29). A `Closure` receives the module [`CapturePolicy`](https://github.com/php-forge/debug-core/blob/b70459f033a1d7a1c5edf7951029aad2061986dd/src/Capture/CapturePolicy.php), so a collector capturing user
data redacts it with the rules the Request panel applies.
After initialization, this property holds a list of resolved instances in registration order.

### $dispatchers <span id="property-dispatchers"></span>

```php
public array<string, string> $dispatchers = []
```

Collector IDs to hand to application components as their PSR-14 dispatcher, `collectorId => componentId`.

The component takes the collector on a public `eventDispatcher` property or on a constructor parameter named
`eventDispatcher`; an already instantiated component only accepts the property form. A dispatcher the component
already configures is kept, and a collector disabled through `enabled => false` is skipped.

## Method details

### beforeAction() <span id="method-beforeAction"></span>

```php
public function beforeAction(yii\base\Action $action): bool
```

Disables the application log targets when [`$enableDebugLogs`](/docs/extensions/debug/reference/module/index.md#property-enableDebugLogs) is `false`, applies the access check, and
detaches the toolbar/header listeners so the debugger response is not polluted with self-debug data.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$action` | [`yii\base\Action`](/docs/api/yii/base/action/index.md) | Action about to run. |

**Returns**

`bool`: `true` when the action may run; `false` to stop the dispatch.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when the log component cannot be resolved.
- [`yii\web\ForbiddenHttpException`](/docs/api/yii/web/forbiddenhttpexception/index.md): when an identity action has no user-switch authorization behavior or the caller fails the access check on a non-toolbar route.
- [`Throwable`](https://www.php.net/manual/en/class.throwable.php): when an active collector cannot shut down cleanly.

### bootstrap() <span id="method-bootstrap"></span>

```php
public function bootstrap(yii\base\Application $app): void
```

Wires the debug log target, the toolbar/header listeners, the error-page injection hook, and the debugger URL
rules onto the application.

Called by Yii during the application bootstrap phase (when this module is listed in `bootstrap`).

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$app` | [`yii\base\Application`](/docs/api/yii/base/application/index.md) | Application being bootstrapped. |

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when the log-target configuration does not resolve to a [`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md).

### createCapturePolicy() <span id="method-createCapturePolicy"></span>

```php
public function createCapturePolicy(list<string> $additionalSensitiveKeys = []): PHPForge\Debug\Capture\CapturePolicy
```

Creates the shared persistent-data policy, optionally extending its exact-key list for one collector.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$additionalSensitiveKeys` | `list<string>` | Collector-specific exact keys added without weakening global rules. |

**Returns**

[`CapturePolicy`](https://github.com/php-forge/debug-core/blob/b70459f033a1d7a1c5edf7951029aad2061986dd/src/Capture/CapturePolicy.php): Shared policy covering the global rules and the collector-specific keys.

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): when the configured keys, prefixes, patterns, or body limit are rejected.
- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when the registered [`CapturePolicyFactory`](/docs/extensions/debug/reference/service/capturepolicyfactory/index.md) definition is invalid.

### getCollectorCoordinator() <span id="method-getCollectorCoordinator"></span>

```php
public function getCollectorCoordinator(): PHPForge\Debug\Collector\CollectorCoordinator
```

Returns the validated collector coordinator used by the request log target.

**Returns**

`PHPForge\Debug\Collector\CollectorCoordinator`: Configured collector coordinator.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when module initialization has not completed.

### getLogTarget() <span id="method-getLogTarget"></span>

```php
public function getLogTarget(): yii\debug\LogTarget
```

Returns the initialized [`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md), raising when the module has not been bootstrapped.

**Returns**

[`LogTarget`](/docs/extensions/debug/reference/logtarget/index.md): Initialized log target of this module.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) has not run yet, so [`$logTarget`](/docs/extensions/debug/reference/module/index.md#property-logTarget) is still a configuration array or a class name.

### getPanelRegistry() <span id="method-getPanelRegistry"></span>

```php
public function getPanelRegistry(): PHPForge\Debug\Registration\PanelRegistry
```

Returns the effective panel catalog, which carries the display order and the IDs disabled by configuration.

**Returns**

[`PanelRegistry`](https://github.com/php-forge/debug-core/blob/b70459f033a1d7a1c5edf7951029aad2061986dd/src/Registration/PanelRegistry.php): Resolved panel catalog.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when module initialization has not completed.

### getShellContextFactory() <span id="method-getShellContextFactory"></span>

```php
public function getShellContextFactory(): yii\debug\service\ShellContextFactory
```

Returns the factory building the page shell of every debugger action.

Registering [`ShellContextFactory`](/docs/extensions/debug/reference/service/shellcontextfactory/index.md) under `components` replaces it, like any other module service.

**Returns**

[`yii\debug\service\ShellContextFactory`](/docs/extensions/debug/reference/service/shellcontextfactory/index.md): Resolved shell factory.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when the registered [`ShellContextFactory`](/docs/extensions/debug/reference/service/shellcontextfactory/index.md) definition is invalid.

### getToolbarHtml() <span id="method-getToolbarHtml"></span>

```php
public function getToolbarHtml(): string
```

Returns the toolbar HTML: a `<yii-debug-toolbar>` custom element wired with data attributes the bundled JS
reads.

**Returns**

`string`: Rendered `<yii-debug-toolbar>` element.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) has not run yet.

### getYiiLogo() <span id="method-getYiiLogo"></span>

```php
public static function getYiiLogo(): string
```

Returns the Yii logo as a data URI ready to drop into `<img src="…">` or `<link rel="icon">`.

Uses the shared frontend file so every framework adapter renders the same Yii mark.

**Returns**

`string`: Logo as a data URI.

### htmlTitle() <span id="method-htmlTitle"></span>

```php
public function htmlTitle(): string
```

Resolves the page title used in the debugger HTML: the literal [`$pageTitle`](/docs/extensions/debug/reference/module/index.md#property-pageTitle) string when set, the result of
the configured callable, or the default `Yii Debugger` label.

**Returns**

`string`: Page title for the debugger HTML.

### init() <span id="method-init"></span>

```php
public function init(): void
```

Resolves the [`$dataPath`](/docs/extensions/debug/reference/module/index.md#property-dataPath) alias and instantiates every configured panel.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when a panel configuration cannot be resolved into a [`Panel`](/docs/extensions/debug/reference/panel/index.md) instance.

### injectToolbarOnErrorPage() <span id="method-injectToolbarOnErrorPage"></span>

```php
public function injectToolbarOnErrorPage(yii\web\ErrorHandlerRenderEvent $event): void
```

Injects the debug toolbar into the rendered HTML of an error page (yiisoft/yii2#7616).

Wired in [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) as a listener for [`ErrorHandler::EVENT_AFTER_RENDER`](/docs/api/yii/web/errorhandler/index.md#const-EVENT_AFTER_RENDER); the event fires after
`renderException()` produces the HTML body but before the response is sent, so handlers may rewrite the output.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$event` | [`yii\web\ErrorHandlerRenderEvent`](/docs/api/yii/web/errorhandlerrenderevent/index.md) | Render event carrying the error-page HTML. |

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) has not run yet.

### renderToolbar() <span id="method-renderToolbar"></span>

```php
public function renderToolbar(yii\base\Event $event): void
```

Renders the mini-toolbar at the end of the page body.

Wired in [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) as a listener for [`View::EVENT_END_BODY`](/docs/api/yii/web/view/index.md#event-EVENT_END_BODY). The toolbar template is rendered
dynamically while its runtime URL is resolved through the Yii2 asset manager.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$event` | [`yii\base\Event`](/docs/api/yii/base/event/index.md) | End-of-body event raised by the view. |

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) has not run yet.
- [`Throwable`](https://www.php.net/manual/en/class.throwable.php): when the view dynamic render fails for the current request.

### route() <span id="method-route"></span>

```php
public static function route(string $action, array<string, yii\debug\TValue> $params = []): non-empty-array<int|string, string|yii\debug\TValue>
```

Builds a module-absolute route array for the given debugger action.

Resolves the module ID from the standalone action currently being dispatched, so widgets and views can build
links without a controller context; outside a debugger dispatch the conventional `debug` module ID is used.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$action` | `string` | Debugger action ID. |
| `$params` | `array<string, yii\debug\TValue>` | Query parameters merged into the route array. |

**Returns**

`non-empty-array<int|string, string|yii\debug\TValue>`: Route array ready for [`Url::to()`](/docs/api/yii/helpers/baseurl/index.md#method-to).

### setDebugHeaders() <span id="method-setDebugHeaders"></span>

```php
public function setDebugHeaders(yii\base\Event $event): void
```

Sets headers carrying debug data on AJAX responses so the toolbar can resolve the captured tag and link back to
the full view.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$event` | [`yii\base\Event`](/docs/api/yii/base/event/index.md) | Response event raised after the action ran. |

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when [`bootstrap()`](/docs/extensions/debug/reference/module/index.md#method-bootstrap) has not run yet.

### setYiiLogo() <span id="method-setYiiLogo"></span>

```php
public static function setYiiLogo(string $logo): void
```

Sets the logo data URI returned by [`getYiiLogo()`](/docs/extensions/debug/reference/module/index.md#method-getYiiLogo).

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$logo` | `string` | Logo as a data URI. |

### checkAccess() <span id="method-checkAccess"></span>

```php
protected function checkAccess(yii\base\Action|null $action = null): bool
```

Returns whether the current request is allowed to access the debugger.

Decided by [`AccessGuard`](/docs/extensions/debug/reference/service/accessguard/index.md) from [`$allowedIPs`](/docs/extensions/debug/reference/module/index.md#property-allowedIPs), [`$allowedHosts`](/docs/extensions/debug/reference/module/index.md#property-allowedHosts), and the optional
[`$checkAccessCallback`](/docs/extensions/debug/reference/module/index.md#property-checkAccessCallback), for the IP the current request carries.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$action` | [`yii\base\Action`](/docs/api/yii/base/action/index.md)`\|null` | Action being dispatched, or `null` outside an action context. |

**Returns**

`bool`: `true` when the request may reach the debugger; `false` otherwise.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when the registered [`AccessGuard`](/docs/extensions/debug/reference/service/accessguard/index.md) definition is invalid.

### coreActionMap() <span id="method-coreActionMap"></span>

```php
protected function coreActionMap(): array<string, class-string>
```

Built-in standalone actions dispatched through [`Module::$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap), keyed by action ID.

**Returns**

`array<string, class-string>`: Action classes indexed by action id.

### coreCollectors() <span id="method-coreCollectors"></span>

```php
protected function coreCollectors(): array<string, array<string, mixed>|string>
```

Built-in collectors paired by stable ID with their presentation panels.

Array keys are a configuration-merge convenience and must match each collector's [`CollectorInterface::id()`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/CollectorInterface.php#L29)
so a user entry under the same key replaces the built-in collector.

**Returns**

`array<string, array<string, mixed>|string>`: Collector definitions indexed by collector id.

### corePanels() <span id="method-corePanels"></span>

```php
protected function corePanels(): array<string, array<string, mixed>|class-string<yii\debug\Panel>|class-string<PHPForge\Debug\Panel>|string>
```

Returns the built-in panel configurations, ordered as the request itself unfolds.

The primary navigation lists Request, Logs, Events, Profiling, Database, Mail, Queue, User, Dump, and Asset
Bundles. `config` opens the list but is surfaced through the brand bar rather than the panel nav; `router` only
feeds Request.

[`CoreDefinitions::merge()`](/docs/extensions/debug/reference/service/coredefinitions/index.md#method-merge) drops a built-in whose optional package is not installed (`queue` without
`yii\queue\Queue`).

**Returns**

`array<string, array<string, mixed>|class-string<`[`Panel`](/docs/extensions/debug/reference/panel/index.md)`>|class-string<PHPForge\Debug\Panel>|string>`: Panel definitions indexed by panel id.

### createStandaloneAction() <span id="method-createStandaloneAction"></span>

```php
protected function createStandaloneAction(string $route): yii\base\Action|null
```

Resolves a debugger endpoint from [`Module::$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap) before falling back to convention-based
discovery.

Application-level dispatch of a module-prefixed route (for example `debug/db-explain`) reaches this method
through [`Module::createStandaloneAction()`](/docs/api/yii/base/module/index.md#method-createStandaloneAction). Convention discovery derives a root-namespace class
from the action ID (`db-explain` becomes `DbExplainAction`) and cannot see the sub-namespaced panel action
classes ([`ExplainAction`](/docs/extensions/debug/reference/actions/db/explainaction/index.md), [`JobAction`](/docs/extensions/debug/reference/actions/queue/jobaction/index.md)), so the mapped
entries are consulted first to keep those routes reachable.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$route` | `string` | Action route relative to this module. |

**Returns**

[`yii\base\Action`](/docs/api/yii/base/action/index.md)`|null`: Resolved action, or `null` when the route matches none.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when object creation fails for a resolvable action-map entry.

### defaultVersion() <span id="method-defaultVersion"></span>

```php
protected function defaultVersion(): string
```

Returns the default module version string.

**Returns**

`string`: Version label reported for this module.

### initActionMap() <span id="method-initActionMap"></span>

```php
protected function initActionMap(): void
```

Hands the built-in, panel-declared, and configured standalone actions to [`StandaloneActionResolver`](/docs/extensions/debug/reference/service/standaloneactionresolver/index.md) and
stores the merged map on [`Module::$actionMap`](/docs/api/yii/base/module/index.md#property-actionMap).

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when the registered resolver definition is invalid.

### initCollectors() <span id="method-initCollectors"></span>

```php
protected function initCollectors(): void
```

Hands the built-in and configured collector definitions to [`CollectorRegistrar`](/docs/extensions/debug/reference/service/collectorregistrar/index.md) and stores the resolved
collectors with the coordinator driving them.

Each resolved collector is instrumented right away: [`initPanels()`](/docs/extensions/debug/reference/module/index.md#method-initPanels) runs afterwards and a panel constructor
may already hit the framework, so instrumentation installed only at [`Application::EVENT_BEFORE_REQUEST`](/docs/api/yii/base/application/index.md#event-EVENT_BEFORE_REQUEST)
would miss the debugger's own bootstrap work.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): When a collector configuration or ID is invalid.

### initPanels() <span id="method-initPanels"></span>

```php
protected function initPanels(): void
```

Hands the built-in and configured panel definitions to [`PanelRegistrar`](/docs/extensions/debug/reference/service/panelregistrar/index.md) and stores the resolved panels
with the catalog describing their display order.

**Throws**

- [`yii\base\InvalidConfigException`](/docs/api/yii/base/invalidconfigexception/index.md): when a panel configuration, a registration option, or the resolved catalog is invalid.

### initPanelServices() <span id="method-initPanelServices"></span>

```php
protected function initPanelServices(): void
```

Registers every enabled panel in the module service locator under its own class and each ancestor class below
[`Panel`](/docs/extensions/debug/reference/panel/index.md).

Standalone actions receive the registered instance through a typed `run()` parameter resolved by the
standalone-action binder, so a configured panel subclass satisfies a built-in type hint such as
`DbPanel $panel`. The generic [`Panel`](/docs/extensions/debug/reference/panel/index.md) base class is never registered because multiple panels would compete
for it; when panels share a class chain, the later entry in [`$panels`](/docs/extensions/debug/reference/module/index.md#property-panels) order wins, matching the action ID
precedence in [`initActionMap()`](/docs/extensions/debug/reference/module/index.md#method-initActionMap).

### resetGlobalSettings() <span id="method-resetGlobalSettings"></span>

```php
protected function resetGlobalSettings(): void
```

Resets application-wide settings the debugger should not inherit from the host application (currently the
asset bundles registry).

### setDebuggerResponseHeaders() <span id="method-setDebuggerResponseHeaders"></span>

```php
protected function setDebuggerResponseHeaders(yii\web\Response $response): void
```

Applies the debugger response hardening policy.

Kept as an extension point so applications can customize the policy without replacing the complete
[`beforeAction()`](/docs/extensions/debug/reference/module/index.md#method-beforeAction) lifecycle.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$response` | [`yii\web\Response`](/docs/api/yii/web/response/index.md) | Response about to be sent. |