duanjiong1952 2014-12-18 06:59
浏览 474
已采纳

如何使用PHPStorm调试WordPress主题

I've installed PHPStorm (8) and trying to debug WordPress theme using xDebug. I tried chrome browser extension and some other settings in the PHP Storm settings.

I've searched a lot but still unable to attach the page to the debugger. What I want is to run the code line by line and check variables etc.

Can someone tell me what exactly is required so the debugging works?

I've following structure:

WAMP is at:  c:\wamp

Project is:  d:\projects\test

alias is: http://localhost/test/

When I opened the project in PHP Storm. It identified it as WordPress project. But it never attaches the browser to debugger.

Edit Here is the related xDebug code in php.ini

zend_extension = "c:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"

[xdebug]
xdebug.remote_enable = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.remote_port = 9000

I also tried true instead of 1. Also tried without providing any port.

  • 写回答

2条回答 默认 最新

  • doutongwei4380 2015-03-12 14:05
    关注

    There seem to be a lot of ways to set up debugging. There are browser plugins, and bookmark commands, and all sorts of elaborate setups.

    For the most part, I always want debugging enabled while I'm developing. If that's true for you, you might consider adding this to your php.ini file:

    xdebug.remote_autostart = 1
    

    In addition, a key part to my setup is that I have to click the button in the toolbar for "Start Listening for PHP Debug Connections", and keep this enabled while I work. This is also in the menus under "Run".

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 全志t113i启动qt应用程序提示internal error
  • ¥15 ensp可以看看嘛.
  • ¥80 51单片机C语言代码解决单片机为AT89C52是清翔单片机
  • ¥60 优博讯DT50高通安卓11系统刷完机自动进去fastboot模式
  • ¥15 minist数字识别
  • ¥15 在安装gym库的pygame时遇到问题,不知道如何解决
  • ¥20 uniapp中的webview 使用的是本地的vue页面,在模拟器上显示无法打开
  • ¥15 网上下载的3DMAX模型,不显示贴图怎么办
  • ¥15 关于#stm32#的问题:寻找一块开发版,作为智能化割草机的控制模块和树莓派主板相连,要求:最低可控制 3 个电机(两个驱动电机,1 个割草电机),其次可以与树莓派主板相连电机照片如下:
  • ¥15 Mac(标签-IDE|关键词-File) idea
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部