Home  >  Article  >  Backend Development  >  Remote debugging technology of Zend Studio_PHP tutorial

Remote debugging technology of Zend Studio_PHP tutorial

WBOY
WBOYOriginal
2016-07-22 09:01:54875browse

When we are still using commands such as print_r, var_dump, echo and exit to debug output of some intermediate parameters, and enjoy it endlessly, maybe we don’t know how inefficient our efficiency is. What an inconvenience.

Although many excellent systems have specially set up debug mode or special debug function during development, these have not substantially improved the complexity of remote debugging work in our development, although we can be very responsible Said: An excellent system requires long-term testing and debugging to improve its performance and optimize its algorithm, but maybe we have doubled the time and labor but not achieved much results. Of course, I am not in favor of it at work. Opportunistic, I am against wasting time at work. Many of our colleagues "wander" in the ocean of code all day long, forgetting to eat and sleep. Seriously, it is even a little unreasonable. I don't know how efficient this is?

Zend Studio’s remote debugging function is a very important feature in our daily development work. This article uses the lightweight zend debugger on the server side. Let’s look at a simple example first:

<ol class="dp-xml">
<li class="alt"><span><span class="tag"><?</span><span class="tag-name">php</span><span>     </span></span></li><li><span>$</span><span class="attribute">i</span><span>=</span><span class="attribute-value">0</span><span>;     </span></li><li class="alt"><span>do{     </span></li><li><span>  echo $i++;     </span></li><li class="alt"><span>}     </span></li><li><span>while($i</span><span class="tag"><</span><span class="tag-name">0</span><span>);     </span></li><li class="alt"><span>$</span><span class="attribute">i</span><span>=</span><span class="attribute-value">0</span><span>;     </span></li><li><span>while($i</span><span class="tag"><</span><span class="tag-name">0</span><span>){     </span></li><li class="alt"><span>  echo $i++;     </span></li><li><span>}     </span></li><li class="alt"><span class="tag">?></span><span>   </span></span></li>
<li class="alt"> </li>
</ol>

When we feel that the words in the book are too abstract and obscure, how can we know more intuitively what the execution process of these two pieces of code is like? Let's try zend studio (hereinafter referred to as zde).

I first save the above code using zend studio at http://localhost:8080/myphppro/debug.php. In zde, select [Debug URL] under the remote debugging menu or tool menu. ...] command, of course, the more convenient and my most recommended method is to press F8 to open the debugging URL dialog box as shown in Figure 1.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445909.htmlTechArticleWhen we are still using commands such as print_r, var_dump, echo and exit to debug output of some intermediate parameters, and we are always enjoying it. When, maybe we don’t know how efficient we are...
Statement:
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