[xdebug]
zend_extension=”C:ApacheAppServphp5.4.20extphp_xdebug-2.3.3-5.4-vc9.dll”
xdebug.default_enable=1
xdebug.auto_trace = 1
xdebug.show_ex ception_trace = 1
xdebug.collect_vars = 1
xdebug.collect_return = 1
xdebug.collect_params = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_name = “cachegrind. out.%t-%s”
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port=9002
xdebug.idekey=”PHPSTORM”
In the configuration of xdebug in php.ini, the default port is 9000. It is best to change it to something else. I changed it to 9002. The idekey needs to be set by yourself. It will be needed for phpstorm configuration later.
Open phpstorm, ctrl+alt+s to open settings, first modify the php version
Debug port is changed to 9002
Servers added:
Just write your name
host: The project domain name is generally localhost
port: port number
debugger: Default Xdebug
Modify DBGp Proxy
IDE key: Fill in the key configured above, here is PHPSTORM
host:localhost (local ip)
port:9002 (xdebug configuration port)
Click here, Edit Configurations
Add debug:
Just write your name
server: Select the server you just configured
Strat url: The loaded file path
After adding it normally, the gray green arrow and bug can be clicked. I use chrome. First go to the app store to install the JetBrains IDE Support plug-in, then put a breakpoint and click the phone icon. Click on the bug, and the browser should automatically open to load the project path. When you return to the ide, you can see the debug information, as shown in the picture
Note: If this error occurs Waiting for incoming connection with ide key '15930'
, it should be that xdebug is not set up properly.
Import dll files
Correct: zend_extension="C:ApacheAppServphp5.4.20extphp_xdebug-2.3.3-5.4-vc9.dll"
Wrong: extension="C:ApacheAppServphp5.4.20extphp_xdebug-2.3.3-5.4-vc9.dll", otherwise it will
The above has introduced phpstorm+xdebug, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.