doudu2591 2012-10-06 15:45
浏览 512
已采纳

IntelliJ IDEA中的PHP调试

Ok, I'm probably stupid but I cannot make it to work.

The setup is:

  • Ubuntu
  • apache2
  • xdebug
  • IntelliJ IDEA 11.1.3 Ultimate
  • IntelliJ IDEA PHP Plugin

xdebug is installed.

I would like to debug Drupal site, on my local machine, the project is here:

/var/www/luken/my-site

and URL is here:

http://localhost/luken/my-site

Because I couldn't create a project from existing sources, I created new project (web module) from scratch there. Now the thing is that if I'm running configuration for "PHP Script" - debugger works. But if I try to use configuration for PHP Web Application (so project would be opened in browser) it cannot connect to debugger. I tried a lot of things, and different mappings but obviously I'm missing something stupid. How configuration should look with above setup?

  • 写回答

2条回答

  • drjyvoi734793 2012-10-06 16:10
    关注

    Of course. I found answer few minutes after posting a question, regardless of hour of investigation before, but here it is:

    I read somewhere wrong information that you doesn't need to configure xdebug. In reality, you need to modify /etc/php5/conf.d/xdebug.ini . I added there:

    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
    

    Which I read about in article about configuring Netbeans, and the thing worked. And precisely:

    xdebug.remote_enable=1
    

    ^ This line is only required.

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

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?