phpStorm配置xdebug远程调试

  

安装xdebug

  
      <李>   

    下载xdebug
    可到xdebug官网下载与自己PHP版本对应的xdebug扩展

      李   <李>安装李   
  
 <代码>(根)# cd/usr/local/src
  (根)#焦油zxvf xdebug-2.6.0RC2.tgz
  (根)# cd xdebug-2.6.0RC2
  (根)#/usr/local/php/bin/phpize
  (根)# ./configure——enable-xdebug with-php-config=/usr/地方/php/bin/php-config
  (根)#做,,使安装 
  
      <李>配置xdebug
    修改php . ini中配置文件,在文件中追加以下内容   
     <代码> zend_extension=xdebug。//指定Xdebug扩展文件的路径
      xdebug。remote_enable=1//是否开启远程调试
      xdebug。remote_handler=dbgp//指定远程调试的处理协议
      xdebug。remote_mode=点播//可以设为点播或jit,要求表示脚本一开始运行就连接远程客户端,jit表示脚本出错时才连接远程客户端。
      xdebug.remote_host=192.168.1.98//指定远程调试的主机名(安装phpstorm的主机ip)
      xdebug。remote_port=9001//指定远程调试的端口号
      xdebug。idekey=" PHPSTORM "//指定传递给DBGp调试器处理程序的IDE关键代码 之前
      

    其他配置项见官网

      
  

配置phpstorm

  
      <李>弹出设置窗口(文件→设置或ctrl + alt + S)   
  

 phpStorm配置xdebug远程调试

  
      <李>设置调试端口,需要与php . ini中的配置一致李   
  

 phpStorm配置xdebug远程调试

  
      <李>配置调试主机李   
  

 phpStorm配置xdebug远程调试

  

 phpStorm配置xdebug远程调试

  

 phpStorm配置xdebug远程调试

  
      <李>测试李   
  

 phpStorm配置xdebug远程调试

phpStorm配置xdebug远程调试