This morning, xdebug has been around for a while. Record it and try again later.
Environment:
The code is as follows: |
Copy code |
Windows 7 Business Edition Service Pack 1 (64-bit)
XAMPP v3.2.1
|
In this version of XAMPP, the built-in php_debug.dll module cannot be enabled. If an error is reported, download it from xdebug.org.
I tried several versions to find the available ones.
After the installation is complete, try one by one. Some errors cannot be run, and some do not, but the phpinfo () does not show that xdebug has been loaded.
Only
Php_xdebug-2.2.3-5.4-vc9.dllYes. (for a 64-bit system, why is a 32-bit dll running? Is it related to my php version? I feel that the php that comes with xampp is compiled in 32 bits ).
Install Xdebug
Put the next Xdebug file in the ext folder of the php directory and modify php. ini.
[Xdebug] zend_extension = "d:/xampp/php/ext/php_xdebug-2.2.3-5.4-vc9.dll"
|
[Xdebug]
Zend_extension = "d:/xampp/php/ext/php_xdebug-2.2.3-5.4-vc9.dll"
|
After restarting Apache, check phpinfo again. The xdebug option indicates that the xdebug module is enabled (I use xampp under win. If it is Linux, you may need to restart the php service, for example, in the php-fpm mode ).
Output the result to the IDE
Open the remote mode of xdebug and edit php. ini. The Complete configuration is as follows:
[Xdebug] zend_extension = "d:/xampp/php/ext/php_xdebug-2.2.3-5.4-vc9.dll" xdebug. remote_enable = Onxdebug. remote_host = 127.0.0.1xdebug.remote _ port = 9000xdebug. remote_handler = "dbgp"
|
[Xdebug]
Zend_extension = "d:/xampp/php/ext/php_xdebug-2.2.3-5.4-vc9.dll"
Xdebug. remote_enable = On
Xdebug. remote_host = 127.0.0.1
Xdebug. remote_port = 9000
Xdebug. remote_handler = "dbgp"
|
Restart and configure the IDE. I will use phpstorm as an example here.
File-> Settings-> PHP-> Servers
Configure as shown in the figure.
Run-> edit configurations
Create a PHP Web Application configuration
As shown in the figure, edit your own configuration