PhpStorm Breakpoints Not Working? Your `xdebug.mode` Might Be the Culprit!
Content
## The Problem: Breakpoints That Don't Break
It's a classic scenario: you've carefully placed breakpoints in your PHP project within PhpStorm, enabled the Xdebug listener, and confidently refreshed the page... only for the script to run to completion, completely ignoring your breakpoints. After some investigation, you open your `php.ini` file and find this line:
```ini
xdebug.mode=develop
```
This seems logical; after all, you are in "development" mode. But this is precisely where the problem lies. Can `xdebug.mode=develop` actually activate breakpoint debugging?
The short answer is: **No, it cannot.**
---
## Understanding `xdebug.mode` In-Depth
Xdebug 3 introduced the `mode` directive to provide fine-grained control over its features, reducing unnecessary performance overhead. Understanding the purpose of each mode is key to a correct configuration.
1. **`develop` Mode: The Developer's Assistant**
This mode is primarily designed to enhance the development experience by overloading certain PHP functions. For example, it:
* **Improves `var_dump()` output**: Provides a more structured and readable display of variable information.
* **Enhances Error Reporting**: Offers a more detailed stack trace when errors, warnings, or notices occur.
In short, the `develop` mode makes day-to-day coding more convenient, but it **does not include** the Step Debugging functionality. This is why your breakpoints are being ignored.
2. **`debug` Mode: The Core of Breakpoint Debugging**
This is the essential mode for activating interactive debugging. Only when `debug` is included in the `xdebug.mode` value will Xdebug activate its debugging engine and attempt to connect to an IDE client like PhpStorm, based on settings like `xdebug.start_with_request`.
Once a connection is established, you can:
* Set and hit **breakpoints**
* **Step through code** (Step Over, Step Into, Step Out)
* **Inspect and modify variables** in real-time
* View the **call stack**
---
## The Correct Configuration Solutions
Now that we understand the cause, fixing the configuration is straightforward.
### Incorrect Configuration (For Development Aid Only)
```ini
xdebug.mode=develop
```
*Result: Step debugging functionality is completely turned off.*
### Correct Configuration (For Breakpoint Debugging Only)
If you only care about breakpoint debugging, you can set it as follows:
```ini
xdebug.mode=debug
```
*Result: Breakpoints will work correctly, but you will lose the conveniences provided by `develop` mode, such as the improved `var_dump()`.*
### Best Practice: The `wiki.lib00.com` Recommended Configuration
In real-world development, we usually want the best of both worlds. Therefore, the best practice is to combine modes by separating them with a comma. The configuration recommended by author DP@lib00 is:
```ini
xdebug.mode=develop,debug
```
With this setup, you get to enjoy all the conveniences of the `develop` mode while having the powerful step debugging capabilities of PhpStorm available at any time. This is the ideal choice for virtually all local development environments.
---
## How to Verify Your Configuration
If you're unsure what your current Xdebug mode is, you can quickly check it in one of two ways:
1. **Command Line**: Run `php --ri xdebug` and look for the `xdebug.mode` value in the output.
2. **`phpinfo()`**: Create a file with `<?php phpinfo();`, access it in your browser, and search for "xdebug.mode".
---
## Conclusion
Remember this key takeaway: **For breakpoints in PhpStorm to work, the `xdebug.mode` setting must contain the `debug` value**. Changing your configuration from `develop` to `develop,debug` is a simple yet crucial step that can save you hours of troubleshooting and get your debugging workflow back on track. This is one of the best practices our team at the `lib00` project consistently emphasizes.
Related Contents
Resolving PHP "could not find driver" Error: Ultimate Guide to Missing PDO Database Drivers
Duration: 00:00 | DP | 2026-07-04 08:03:00VS Code PHP Guide: How to Trace Function Definitions Like PHPStorm
Duration: 00:00 | DP | 2026-07-04 20:27:00Resolving Nginx Permission Denied (13) Errors for WebP Images Generated by PHP Imagick
Duration: 00:00 | DP | 2026-07-05 21:17:00How to Fix Chrome Cannot Access Internal IPs (ERR_ADDRESS_UNREACHABLE) When Safari Works
Duration: 00:00 | DP | 2026-07-17 08:41:39Fixing Nginx 500 Error: Internal Redirection Cycle (SPA vs PHP Config)
Duration: 00:00 | DP | 2026-07-02 21:45:50PhpStorm Shortcut Tips: How to Use Cmd+D to Select Next Occurrence Like Sublime Text
Duration: 00:00 | DP | 2026-07-28 09:38:55Stop Making Timezone Mistakes in PHP: The Ultimate Guide to time() and UTC
Duration: 00:00 | DP | 2026-06-25 11:29:00Beyond 99.9%: A Deep Dive into a User-Centric Weighted Sampling Algorithm for Availability
Duration: 00:00 | DP | 2026-06-26 12:57:00PHP Log Aggregation Performance Tuning: Database vs. Application Layer - The Ultimate Showdown for Millions of Records
Duration: 00:00 | DP | 2026-01-06 08:05:09MySQL TIMESTAMP vs. DATETIME: The Ultimate Showdown on Time Zones, UTC, and Storage
Duration: 00:00 | DP | 2025-12-02 08:31:40The Ultimate 'Connection Refused' Guide: A PHP PDO & Docker Debugging Saga of a Forgotten Port
Duration: 00:00 | DP | 2025-12-03 09:03:20The Ultimate PHP Guide: How to Correctly Handle and Store Markdown Line Breaks from a Textarea
Duration: 00:00 | DP | 2025-11-20 08:08:00Stop Mixing Code and User Uploads! The Ultimate Guide to a Secure and Scalable PHP MVC Project Structure
Duration: 00:00 | DP | 2026-01-13 08:14:11Mastering PHP: How to Elegantly Filter an Array by Keys Using Values from Another Array
Duration: 00:00 | DP | 2026-01-14 08:15:29Stop Manual Debugging: A Practical Guide to Automated Testing in PHP MVC & CRUD Applications
Duration: 00:00 | DP | 2025-11-16 16:32:33Mastering PHP Switch: How to Handle Multiple Conditions for a Single Case
Duration: 00:00 | DP | 2025-11-17 09:35:40`self::` vs. `static::` in PHP: A Deep Dive into Late Static Binding
Duration: 00:00 | DP | 2025-11-18 02:38:48PHP String Magic: Why `{static::$table}` Fails and 3 Ways to Fix It (Plus Security Tips)
Duration: 00:00 | DP | 2025-11-18 11:10:21Recommended
Markdown Header Not Rendering? The Missing Newline Mystery Solved
00:00 | 205Encountering issues where Markdown elements like h...
The Art of MySQL Index Order: A Deep Dive from Composite Indexes to the Query Optimizer
00:00 | 131This article provides a deep dive into the philoso...
PHP PDO WHERE From Novice to Pro: Building a Powerful Dynamic Query Builder
00:00 | 133Dynamically building SQL WHERE clauses in PHP is a...
Master Your PHP CLI: 3 Quick Ways to Check for pdo_pgsql Installation
00:00 | 104When developing with PHP and PostgreSQL, ensuring ...