PHP breakpoint debugging using phpstorm

韦小宝
Release: 2023-03-20 19:42:02
Original
67640 people have browsed it

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!

PHP breakpoint debugging using phpstorm

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.

2. Install xdebug to php

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
Copy after login

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

PHP breakpoint debugging using phpstorm

PHP breakpoint debugging using phpstorm

PHP breakpoint debugging using phpstorm

PHP breakpoint debugging using phpstorm

PHP breakpoint debugging using phpstorm

PHP breakpoint debugging using phpstorm

#After hitting the breakpoint, you can start

PHP breakpoint debugging using phpstorm

PHP breakpoint debugging using phpstorm

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template