# DebugUrlGenerator

> Yii URL-manager adapter for the framework-neutral debugger URL contract.

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

| final readonly class | `yii\debug\routing\DebugUrlGenerator` |
| --- | --- |
| Implements | `PHPForge\Debug\Routing\DebugUrlGeneratorInterface` |
| Source | [`src/routing/DebugUrlGenerator.php`](https://github.com/yii2-extensions/debug/blob/main/src/routing/DebugUrlGenerator.php#L15) |

Yii URL-manager adapter for the framework-neutral debugger URL contract.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Binds debugger URLs to the normalized module ID. | `DebugUrlGenerator` |
| [`panel()`](#method-panel) | Builds a panel URL while keeping the captured tag and target panel authoritative. | `DebugUrlGenerator` |

## Method details

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

```php
public function __construct(string $moduleId = 'debug')
```

Binds debugger URLs to the normalized module ID.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$moduleId` | `string` | Unique id of the debugger module; falls back to `'debug'` when empty. |

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

```php
public function panel(string $tag, string $panel, array<array-key, mixed> $queryParams = []): string
```

Builds a panel URL while keeping the captured tag and target panel authoritative.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$tag` | `string` | Capture to open. |
| `$panel` | `string` | Panel to open within that capture. |
| `$queryParams` | `array<array-key, mixed>` | Extra query parameters; route-owned keys are ignored. |

**Returns**

`string`: Absolute URL of the panel view.