phpstrom 与 xdebug 配合实现PHP单步调试

不说废话,直接开始。

第一步: 安装并配置xdebug

  1.   安装
      可以从官网直接下载对应php版本的xdebug,下载地址:  https://xdebug.org/download.php 
  2.   配置,典型的配置如下:

    zend_extension="xxxxx"  // xdebug地址

    xdebug.remote_enable = On

    xdebug.remote_connect_back = 1

    xdebug.remote_host= client_ip_address  // 客户端ip地址

    xdebug.remote_port = 9000 // 端口号,phpstorm中默认为9000,这里需要和客户端端口号对应

    xdebug.idekey = PHPSTORM // 这里需要和客户端配置一致

第二步:配置phpstorm

  1. File-》Settings-》Languages & Frameworks -》 PHP -》 Debug



  2. 打开Phpstorm 主面板 ,按下图所示配置debug参数







  3.  打开Phpstorm 的debug

三、设置断点 and enjoy it !

 

posted @ 2016-07-08 00:11  talk_is_cheap  阅读(206)  评论(0编辑  收藏  举报