phpstorm debug configuration xdebug

Environment IDE phostorm 2018.2, server MAMP, machine mba

The configuration process is relatively simple, not as troublesome as it says online, and there is no need to install a browser plug-in

1. Find the php running configuration file php.ini, this must be found right, there may be multiple php environments on the machine

Mine is in /Applications/MAMP/bin/php/php7.2.10/conf/php.ini

2. Edit the ini file, find the configuration of xdebug at the end, cancel the comment, or directly copy the following content to enable the xdebug function

[xdebug]

zend_extension="/Applications/MAMP/bin/php/php7.2.10/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so"

xdebug.remote_enable=1

xdebug.remote_port=9000

3. Save and restart apache

4. Visit the server's phpinfo to find out whether there is a configuration of xdebug. If it is not stated that it has not been successfully opened, it is generally caused by the path. If you are another server suite, see if there is a library for xdebug. If not, download one and repeat the above steps.

If normal, you can see the following configuration

xdebug support enabled
Version

2.6.0

5. Check the phpstorm debug configuration, mainly the port, and enable the start listening function in phpstrom (the small green phone in the upper right corner). Generally, by this step, it can already be debugged in chrome. As for the IDEA browser plug-in that I used online, I did not install it.

Published 14 original articles · Like8 · Visit 70,000+

Guess you like

Origin blog.csdn.net/wm20000/article/details/86548063