Home > Article > Development Tools > An article to help you learn breakpoint debugging
❝It is inevitable that you will encounter unknown errors during the development process. Please specify not to debug bit by bit! This article will show you how to use atom to debug the program. If you have any If you have any questions, just reply in the comment area.
❞
Click file->settings Then click install and search for php-debug. If the search here cannot come up, you need to find a way! We must learn to surf the Internet scientifically! Successful installation is like this
Download address: https://xdebug.org/download
, After opening the address, you can see the extension. The one installed here is php7.3, but there are two php7.3s, which one should you choose? Open your PHP environment and you can see vc15 in the box, then put the downloaded file into D:\phpstudy_pro\Extensions\php\php7.3.4nts\ext
, here is the address of Kaka . Just put it in your own PHP environment.
Then find your php.ini file and copy the following configuration Go in. Remember to modify the location of zend_extension
.
This location is related to your PHP location.
<span style="display: block; background: url(https://imgkr.cn-bj.ufileos.com/97e4eed2-a992-4976-acf0-ccb6fb34d308.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; letter-spacing: 0px; padding-top: 15px; background: #282c34; border-radius: 5px;">[Xdebug]<br/>zend_extension = D:\phpstudy_pro\Extensions\php\php7<span class="hljs-number" style="color: #d19a66; line-height: 26px;">.3</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">.4</span>nts\ext\php_xdebug<span class="hljs-number" style="color: #d19a66; line-height: 26px;">-2.9</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">.6</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">-7.3</span>-vc15-nts-x86_64.dll<br/>xdebug.remote_enable = On<br/>xdebug.remote_host = localhost<br/>xdebug.remote_port = <span class="hljs-number" style="color: #d19a66; line-height: 26px;">9000</span><br/>xdebug.remote_handler = dbgp<br/>xdebug.idekey=xdebug-atom<br/></code>
How to determine this location! If you are using the new version of phpstudy
, D:\phpstudy_pro\Extensions\php\php7.3.4nts\ext
That is this locationIf you are using the old version of phpstudy The location is C:\phpStudy\PHPTutorial\php\php-7.1.13-nts\ext
http://localhost/index.php?XDEBUG_SESSION_START=1Note here the following parameters.
The debugging panel will come out at this time, and you can see that our variable values have been printed. Up to this point our breakpoint debugging is complete.
Summary of important steps for configuring breakpoints.
?
The above is the detailed content of An article to help you learn breakpoint debugging. For more information, please follow other related articles on the PHP Chinese website!