Do you have a problem in 2023 that sometimes PHP Storm wont work with X debug 3?
April 14th, 2023
Debugging your PHP code is an essential part of the development process. PHPStorm and XDebug 3 are powerful tools that can help you debug your code efficiently.
However, sometimes you may encounter an issue where the debugger never stops on a breakpoint. Here are some steps you can take to troubleshoot this issue.
First, check if XDebug is installed on your system by running the command
If it is not installed, you can install it using PECL by running the command
pecl install xdebug.
Next, make sure that you have set the correct PHP.ini directives for XDebug. You can do this by adding the following lines to your PHP.ini file:
zend_extension="xdebug.so" [xdebug] xdebug.mode=debug xdebug.client_port=9003 xdebug.client_host=127.0.0.1
After making changes to your PHP.ini file, make sure to restart your server to apply the changes. You can check if XDebug is properly loaded by running the command
php -r "xdebug_info();". This will display information about the XDebug extension.
Make sure that the XDebug extension for your browser is installed and running.
This will allow PHPStorm to communicate with the browser and stop on breakpoints.
In PHPStorm, make sure that the debugger is listening by clicking on the little bug button. If the button is green, it means that the debugger is listening.
If you have followed all these steps and the debugger still does not stop on breakpoints, it may be an issue with your project settings in PHPStorm.
Check if you have set up a server in PHPStorm under PHP/Servers.
If you have, try deleting the server and reloading the page you are trying to debug. This should fix the issue.
Debugging can be a frustrating process, but with these steps, you should be able to troubleshoot the issue and get back to coding. Happy debugging!