It is said in PHP development that a lazy programmer is a qualified programmer. In PHP development, Debugging is a must. You may have to debug it many times, again and again. , today we will teach you how to be lazy, so let’s talk about using phpstorm to be lazy!
1. Download the xdebug module
Note: with "ts" It means threadsafety, and "nts" is not marked. That is to say, if you want to download an unmarked file of nts, the downloaded file name is actually marked.
Copy the downloaded dll to the ext folder in php (Extended dlls are all here), renamed to php_xdebug.dll.
Modify in php.ini (add under "; Module Settings;"):
[xdebug] zend_extension=php_xdebug.dll xdebug.remote_enable = On xdebug.remote_handler = dbgp xdebug.remote_host= localhost xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM
Check on the phpinfo page, there will be Xdebug related information indicates that php has been configured!
3. Configuring phpstorm
The language is pale and feeble, let’s just go to the tutorial
#After hitting the breakpoint, you can start You can test it yourself! It will bring you great convenience. You don’t have to debug one by one. One breakpoint solves everything! ! Hahaha! Just so lazy!
The above is the detailed content of PHP breakpoint debugging using phpstorm. For more information, please follow other related articles on the PHP Chinese website!