php安装调试工具xdebug

动态 已结 1 694
江天 VIP1 2018年11月30日 11:05:24
悬赏:5积分
<p>主要参考了官网的这篇文章:</p><p><span class="serif"> <span class="sans">XDEBUG EXTENSION FOR PHP | DOCUMENTATION | INSTALLATION</span> </span></p><div id="menu"><span class="sans"><a href="/index.php" target="_blank" rel="nofollow">home</a> |<a href="/updates.php" target="_blank" rel="nofollow">updates</a> |<a href="/download.php" target="_blank" rel="nofollow">download</a> |<a href="/docs/" target="_blank" rel="nofollow">documentation</a> |<a href="/contributing.php" target="_blank" rel="nofollow">contributing</a> |<a href="/license.php" target="_blank" rel="nofollow">license</a> |<a href="/support.php" target="_blank" rel="nofollow">support</a> |<a href="https://www.larryms.com/forums.html" target="_blank">issue tracker</a></span></div><p><span class="serif"> </span></p><h2>Tailored Installation Instructions</h2><p><span style="font-weight:bold; font-size:x-large;">Summary</span> </p><li><b>Xdebug installed:</b> 2.6.1</li><li><b>Server API:</b> FPM/FastCGI</li><li><b>Windows:</b> no</li><li><b>Zend Server:</b> no</li><li><b>PHP Version:</b> 7.1.24</li><li><b>Zend API nr:</b> 320160303</li><li><b>PHP API nr:</b> 20160303</li><li><b>Debug Build:</b> no</li><li><b>Thread Safe Build:</b> no</li><li><b>Configuration File Path:</b> /usr/local/etc/php/7.1</li><li><b>Configuration File:</b> /usr/local/Cellar/php<a href="/jump.html?name=7.1/7.1.24/.bottle/etc/php/7.1/php.ini</li><li><b>Extensions" target="_blank" rel="nofollow">@7.1/7.1.24/.bottle/etc/php/7.1/php.ini</a></li><li><a href="/jump.html?name=7.1/7.1.24/.bottle/etc/php/7.1/php.ini</li><li><b>Extensions" target="_blank" rel="nofollow"><b>Extensions</b></a><b> directory:</b> /usr/local/Cellar/php<a href="/jump.html?name=7.1/7.1.24/lib/php/20160303</li><h2>You're" target="_blank" rel="nofollow">@7.1/7.1.24/lib/php/20160303</a></li><h2><a href="/jump.html?name=7.1/7.1.24/lib/php/20160303</li><h2>You're" target="_blank" rel="nofollow">You're</a> already running the latest Xdebug version</h2><p>But here are the instructions anyway:</p><ol><li>Download <a href="https://www.larryms.com/forums.html" target="_blank">xdebug-2.6.1.tgz</a></li><li>Unpack the downloaded file with <code>tar -xvzf xdebug-2.6.1.tgz</code></li><li>Run: <code>cd xdebug-2.6.1</code></li><li><p>Run: <code>phpize</code> (See the <a href="/docs/faq#phpize" target="_blank" rel="nofollow">FAQ</a> if you don't have <code>phpize</code>.</p><p>As part of its output it should show: </p><pre>Configuring for:...Zend Module Api No: 20160303Zend Extension Api No: 320160303</pre><p></p><p>If it does not, you are using the wrong <code>phpize</code>. Please follow<a href="/docs/faq#custom-phpize" target="_blank" rel="nofollow">this FAQ entry</a> and skip the next step.</p></li><li>Run: <code>./configure</code></li><li>Run: <code>make</code></li><li>Run: <code>cp modules/xdebug.so /usr/local/Cellar/php<a href="/jump.html?name=7.1/7.1.24/lib/php/20160303</code></li><li>Update" target="_blank" rel="nofollow">@7.1/7.1.24/lib/php/20160303</a></code></li><li><a href="/jump.html?name=7.1/7.1.24/lib/php/20160303</code></li><li>Update" target="_blank" rel="nofollow">Update</a> <code>/usr/local/Cellar/php<a href="/jump.html?name=7.1/7.1.24/.bottle/etc/php/7.1/php.ini</code>" target="_blank" rel="nofollow">@7.1/7.1.24/.bottle/etc/php/7.1/php.ini</a></code> and change the line <code>zend_extension = /usr/local/Cellar/php<a href="/jump.html?name=7.1/7.1.24/lib/php/20160303/xdebug.so</code></li><li>Restart" target="_blank" rel="nofollow">@7.1/7.1.24/lib/php/20160303/xdebug.so</a></code></li><li><a href="/jump.html?name=7.1/7.1.24/lib/php/20160303/xdebug.so</code></li><li>Restart" target="_blank" rel="nofollow">Restart</a> the webserver</li></ol><p><span class="serif"></span></p><p> If you like Xdebug, and thinks it saves you time and money, please have a look at the <a href="/donate.php" target="_blank" rel="nofollow">donation</a> page.</p><p> </p><p>传送门:https://xdebug.org/wizard.php</p><p>不过因为我mac上存有两个版本的php,一个5.6,一个7.1.14,所以在打印phpinfo的时候xdebug扩展装好了,但是php -m的时候没有,经查原来是因为存在两个php.ini,可能使用了老的php.ini文件,所以命令没有显示出来,解决办法是把ini文件路径给指定了就有了。</p><p>《php添加扩展 在phpinfo能看到该扩展,但在cli用php -m 却看不到,为什么呢,求指教》</p><p>1. 没有出现的原因是:执行时添加上php.ini的文件就可以了 </p><p>$ /usr/local/php/bin/php -c /usr/local/php/etc/php.ini -m | grep cb //cb是模块名</p><p>2. $ /usr/local/php/bin/php --ini | grep Configuration 把php.ini文件复制一份到这个目录下就可以了。 </p><p> </p><p>下一步则是配置ide,chrome浏览器的crx文件已经安装。</p><p>传送门:https://www.cnblogs.com/xiedie/p/5398150.html<br></p><p> </p>
回帖
提交回复
您的回贴若被采纳将获得悬赏积分;但恶意灌水广告贴将会受到系统惩罚,共同营造良好交流氛围