set_breakpoint
Set breakpoints in PHP code for debugging with Xdebug. Configure line breakpoints, conditional expressions, and hit counts to pause execution at specific points.
Instructions
Set a breakpoint in PHP code. Supports line breakpoints and conditional breakpoints with hit counts. Can be set before a debug session starts - breakpoints will be applied when a session connects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Full file path (use container path for Docker, e.g., /var/www/html/index.php) | |
| line | Yes | Line number for the breakpoint | |
| condition | No | Optional PHP condition expression (e.g., '$x > 10' or '$user !== null') | |
| hit_value | No | Hit count value - break after this many hits | |
| hit_condition | No | Hit condition: >= (break when hits >= value), == (break on exact hit), % (break every N hits) | |
| session_id | No | Session ID (uses active session if not specified) |