zoukankan      html  css  js  c++  java
  • 在Intellij IDEA或者PhpStorm下用X-debug调试PHP

    用Intellij IDEA或者PhpStorm使用X-debug来调试PHP,主要需要配置的部分有三个地方,分别为php.ini的配置,IDEA的配置和浏览器的配置,主要如下,以备忘:

    • .ini的主要配置如下所示,关键参数根据实际情况可以修改:
      []
      zend_extension_ts=”X:/App/php-5.2.17-Win32-VC6-x86/ext/php_xdebug-2.1.1-5.2-vc6.dll”
      xdebug.remote_host=jichengdiaoding.com
      xdebug.remote_port = 9000
      xdebug.remote_mode = “req”
      xdebug.remote_enable = on
      xdebug.remote_handler = dbgp
      xdebug.idekey = “netbeans-xdebug”
      xdebug.profiler_enable=on
      xdebug.trace_output_dir=”X:/App/php-5.2.17-Win32-VC6-x86/xdebuginfo”
      xdebug.profiler_output_dir=”X:/App/php-5.2.17-Win32-VC6-x86/xdebuginfo”
      xdebug.auto_trace=on
      xdebug.collect_params=on
      xdebug.collect_return=on
      xdebug.show_exception_trace = On
      xdebug.remote_autostart = On
      xdebug.collect_vars = On配置好了,在CMD里面输入X:/App/php-5.2.17-Win32-VC6-x86/php.exe -m,如果能看到XDebug模块,说明开启成功。
      *: 值得注意的是,这里需要确定好XDebug和PHP的对应版本
    • IDEA的配置如下:
      进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填要调试的主机名 (如:jichengdiaoding.com或者localhost等),host填(如:localhost或者amiku.cn等),port填 80,debugger选XDebug

      进入File>Settings>PHP>Debug,看到XDebug选项卡,port填9000,其他默认

      进入File>Settings>PHP>Debug>DBGp Proxy,IDE key 填 netbeans-xdebug,host 填jichengdiaoding.com,port 填80
    • 在Firefox或者Chrome浏览器中,找到对应的X-Debug版本的插件,如下为Firefox下的调试插件:

      工具的设置里的IDE KEY填上netbeans-xdebug,把jichengdiaoding.com加入到白名单,以后调试的时候把工具启用就好了

      在IDEA中打开PHP的监听,然后就可以进入debug模式,方便的打断点和查看变量以及监测等。
    •  配置完成。
  • 相关阅读:
    ORA-1652: unable to extend temp segment by xxx in tablespace
    Oracle导入异常: unable to create INITIAL extent for segment in tablespace MY_DATA(转)
    EL表达式取值
    JSP错误:According to TLD or attribute directive in tag file, attribute value does not accept any expressions
    springmvc注解绑定参数心得
    springmvc绑定参数出现的异常
    springMVC参数的传递接收方式(转)
    springmvc注解@
    跟着开涛springmvc学习(转)
    CSS div文本垂直居中
  • 原文地址:https://www.cnblogs.com/wawahaha/p/4330437.html
Copyright © 2011-2022 走看看