简体   繁体   English

使用Netbeans和XDebug调试Wordpress

[英]Debugging Wordpress with Netbeans & XDebug

I'm trying to debug a Wordpress site with Netbeans using XDebug. 我正在尝试使用XDebug使用Netbeans调试Wordpress网站。 I can get it to hit a breakpoint on the index.php page, but it won't break on any other page. 我可以在index.php页面上使其达到断点,但在其他任何页面上都不会中断。 Has anyone else run into this issue? 还有其他人遇到这个问题吗?

If I debug a concrete5 site or something it works beautifully. 如果我调试了Concrete5网站或其他工具,则效果很好。 So it has to be something with how Wordpress works. 因此,必须与Wordpress的工作方式有关。

yep. 是的。 Case-sensitive paths, softlinks, and include paths are the root of the problem. 区分大小写的路径,软链接和包含路径是问题的根源。 They need to match in your IDE and your webserver. 它们需要在您的IDE和Web服务器中匹配。 see http://www.noodlecake.com/?p=105 参见http://www.noodlecake.com/?p=105

I had the same issue. 我遇到过同样的问题。 I made sure I had these 2 lines in my php.ini file. 我确保我的php.ini文件中有这两行。

zend_extension= xdebug.remote_enable=true zend_extension = xdebug.remote_enable = true

Make sure the Xdebug version is compatible with your version of PHP. 确保Xdebug版本与您的PHP版本兼容。

Also, check the debug port used for Xdebug. 另外,检查用于Xdebug的调试端口。 I have my defaulted to 9000 我的默认值是9000

It's absolutely possible to use xDebug with WordPress. 绝对有可能在WordPress中使用xDebug。 Take a look at this writeup: http://mondaybynoon.com/2011/03/28/wordpress-development-xdebug/ 看一下这篇文章: http : //mondaybynoon.com/2011/03/28/wordpress-development-xdebug/

I've tryed with eclipse and netbeans na dboth can't debug the wordpress's themes or plugin. 我已经尝试了eclipse和netbeans,但是dboth无法调试wordpress的主题或插件。 They only debug the "core" of wordpress. 他们只调试wordpress的“核心”。 The only one that can debug your plugin and theme is Nusphere phpEd. 可以调试您的插件和主题的唯一工具是Nusphere phpEd。 Sadly isn't free. 可惜不是免费的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM