Skip to content

Commit 9d5b3f2

Browse files
add code samples
1 parent 6ccf6fe commit 9d5b3f2

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

docs/installation.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,32 @@ sidebar:
77
---
88

99
Installing PHP Debugger is straightforward and similar to installing other PHP extensions. The extension is available through PIE and can also be compiled from source. Once installed, you'll need to configure your php.ini file to enable the extension and set up your IDE to communicate with the debugger using the DBGp protocol.
10+
11+
## Configuration
12+
13+
Add the following to your `php.ini` file:
14+
15+
```ini
16+
zend_extension=php_debugger
17+
php_debugger.mode=debug
18+
php_debugger.start_with_request=trigger
19+
php_debugger.client_host=127.0.0.1
20+
php_debugger.client_port=9003
21+
```
22+
23+
## Usage Example
24+
25+
You can trigger breakpoints programmatically in your PHP code:
26+
27+
```php
28+
<?php
29+
function processData($data) {
30+
// Process some data
31+
$result = transform($data);
32+
33+
// Trigger breakpoint for debugging
34+
php_debugger_break();
35+
36+
return $result;
37+
}
38+
```

0 commit comments

Comments
 (0)