我的安装环境:XAMPP版本号V3.1.0 ;phpStorm版本8.0.3;windowsxp 32bit。您老人家先过目一下,不然怕影响意义。

XAMPP、phpStorm 都直接安装在了D盘根目录,9999m目录建在D:\xampp\htocts下,即目录工程文件夹路径为D:\xampp\htocts\9999m。在phpStorm>File>open,找到9999m,点击确定,加载9999m到了phpStorm(安装环境路径根据需要自行更改,后面的配置内容也类似)。图1

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

1.      开始服务器端配置:安装好XAMPP,停止apache服务(注意,如果直接退出XAMPP,是不会停止apache的)。

2.      在安装目录下找到php.ini,类似于D:\xampp\php\php.ini,并打开。

3.      找到被注释掉的项目(去掉前面的?)并按如下设置:

[XDebug]

zend_extension = "D:\xampp\php\ext\php_xdebug.dll"

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_dir = "D:\xampp\tmp"

xdebug.profiler_output_name = "cachegrind.out.%t-%s"

xdebug.remote_enable = on

xdebug.remote_handler = "dbgp"

xdebug.remote_host = "127.0.0.1"

xdebug.trace_output_dir = "D:\xampp\tmp"

xdebug.idekey= PHPSTROM

最初的设置是这样的:图2

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

;的意思是被注释掉了,所以要先去掉;号;

然后开启xdebug.remote_enable = on;

还要增加xdebug.idekey= PHPSTROM。

其中remote_host 是指调试客户端的地址,即IDE所在的IP,同理remote_port 是客户端的端口,这两项在远程调试的情况下注意修改,远程的时候最终改为:

[XDebug]

zend_extension = "D:\xampp\php\ext\php_xdebug.dll"

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_dir = "D:\xampp\tmp"

xdebug.profiler_output_name = "cachegrind.out.%t-%s"

xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"

xdebug.remote_mode = "req"

xdebug.remote_port = 9000

较为全面的配置(参考)

1.3 配置xdebug
  在php.ini尾部添加如下
  [xdebug]
  zend_extension="php_xdebug.dll"
  xdebug.remote_enable = On
  xdebug.remote_host = "localhost"
  xdebug.remote_port = 9000
  xdebug.remote_handler = "dbgp"
  xdebug.auto_trace = 1
  xdebug.collect_includes = 1
  xdebug.collect_params = 1
  xdebug.collect_return = 1
  xdebug.default_enable = 1
  xdebug.collect_assignments = 1
  xdebug.collect_vars = 1
  xdebug.remote_autostart = 1
  xdebug.remote_connect_back = 1
  xdebug.show_local_vars = 1
  xdebug.show_exception_trace = 0
  运行phpinfo();看有xdebug模块信息出来就是搞定了。

4.      保存文件,重新启动apache检查是否成功开启了xdebug服务。图3

XAMPP+phpStorm+XDebug+chrome 配置和断点调试"> 一种方法为在CMD里输入D:\xampp\php\php.exe -m 看到XDebug,说明成功开启XDebug。图4

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

另一种方法为浏览器打开localhost,找到phpinfo()点击打开配置情况,查找xdebug项,找到了说明xdebug配置成功。图5

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

至此,服务器端配置完毕。

5.      下面是客户端调试。打开phpStorm,进入File>Settings>PHP,这里要interpreter浏览,填D:\xampp\php\php.exe,自动识别版本。图6

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

原因是phpstorm 自带的php 插件安装包不完整,路径 C:\Program Files\JetBrains\PhpStorm 10.0\plugins\php 只有一个lib 库; 解决办法,需要装一个xampp 工具包,工具包里自带php 5.6 版本 然后重新将php interpreter 路径指导xampp 安装路径下的php 所在路径,即可detect到php的版本

6.      进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填localhost,host填localhost,port填80,debugger选XDebug。图7

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

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

XAMPP+phpStorm+XDebug+chrome 配置和断点调试" title="本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试" height="305" width="558">

8.      进入File>Settings>PHP>Debug>DBGp Proxy,IDE key 填 PHPSTORM,host 填localhost,port 填9000,点OK退出设置。图9

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

9.      进入Run> Debug configurations,点+号,Server选填localhost,start url填http://localhost/9999m, Browse 填chrome,点OK退出设置。图10

XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

点OK退出设置之后,phpstorm运行按钮旁边自动填充localhost,且运行按钮由灰色被激活成为绿色。如果start url填的是http://localhost,没有填写9999m,则当点击phpstorm运行按钮,浏览器进入默认地址http://localhost,没办法直接访问http://localhost/9999m。图11

XAMPP+phpStorm+XDebug+chrome 配置和断点调试" border="0">

10.   chrome浏览器链接配置。找到对应的插件,chrome的为phpstrom IDE Support chrome.crx,自己下载然后拖动文件到chrome设置>扩展程序。Chrome右上角增加了JB图标即为成功安装插件。图12

XAMPP+phpStorm+XDebug+chrome 配置和断点调试" border="0">

11.   在phpStorm里打开监听,就是一个电话一样的按钮,点击变为绿色,在程序代码点前点击,设置程序段点,点击绿色的debug爬虫按钮,chrome浏览器打开xdebug页,phpStorm出现debug窗口,并获取到variables值,即为看到下面的debug信息,说明成功配置。图13

XAMPP+phpStorm+XDebug+chrome 配置和断点调试" border="0">

12.        链接真心的不错,http://www.chenxuanyi.cn/xampp-phpstorm-xdebug.html

就是第7步“7.进入File>Settings>PHP>Debug>DBGp Proxy,IDE key 填 PHPSTORM,host 填localhost,port 填80。”需要改动下port填为9000。总归要点100个赞。

XAMPP+phpStorm+XDebug+chrome 配置和断点调试" border="0">

13.页面传图不让直接粘贴,所以编个号图n ,汗吧。你可以先弄好10,其他的次序就不要瞎胡变啦就。XAMPP+phpStorm+XDebug+chrome 配置和断点调试" title="本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试">XAMPP+phpStorm+XDebug+chrome 配置和断点调试" title="本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试">

捣鼓着不小心得两小时多了吧。

本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试 注册方法的更多相关文章

  1. 本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试

    不明白phpStorm+XAMPP+chrome组合的phpStorm配置XDebug的断点调试,很多种网页办法都看过了,可用,但没达预期.QQ群问,一个大牛很奇怪我都配置了怎么还不正确,很干脆地说远 ...

  2. phpStorm+XDebug+chrome 配置

    运行环境: phpStorm 10.0.1 PHP 5.6.24 VC11 x86 Thread Safe Xdebug 2.4.1(PHP 5.6 VC11 TS (32 bit) 1. PHP安装 ...

  3. 史上最佳 Mac+PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境的配置

    在上一篇 PHP 系列的文章<PHP 集成开发环境比较>中,我根据自己的亲身体验,非常简略的介绍和对比了几款常用的集成开发环境,就我个人而言,比较推崇 Zend Studio 和 PhpS ...

  4. [转]史上最佳 Mac+PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境的配置

    本文转自:https://www.cnblogs.com/lishiyun19/p/4470086.html 在上一篇 PHP 系列的文章<PHP 集成开发环境比较>中,我根据自己的亲身体 ...

  5. XAMPP + PhpStorm + Xdebug本地实验环境搭建

    参考: 下载合适的XDebug 点击这里,选择合适xdebug XAMPP配置 php_xdebug-xxxx.dll 拷贝dll至 D:\XAMPP\php\ext php.ini 文末追加 [XD ...

  6. PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境配置

    0x01 Xdebug安装 参考:https://xdebug.org/docs/install cd xdebug-/ phpize sudo ./configure --enable-xdebug ...

  7. 本地环境phpStorm10+XDebug配置和断点调试

    安装环境:XAMPP;phpStorm版本10; windows 7 64bit. XAMPP.phpStorm 都直接安装在了D盘根目录,9999m目录建在D:\xampp\htocts下,即目录工 ...

  8. Xampp PHPStorm XDebug配置

    (1)https://xdebug.org/download.php 下载当前Xampp对应的XDebug版本. (2)将该dll放入C:\xampp\php\ext (3)修改Control Pan ...

  9. phpstorm中xdebug配置和断点调试

    今天赶紧把这个搞了  运行环境: phpStorm 2018 PHP 5.45 nts VC9 Xdebug 2.4.1 0x01 PHP安装xdebug扩展 自己之前装一直没装起 原来是版本问题 下 ...

随机推荐

  1. SSRS配置

    1. Reporting Services Configuration Manager-->Execution Account. 2. C:\Program Files\Microsoft SQ ...

  2. SharePoint 2013的100个新功能之内容管理(三)

    一:视频中的人 作为视频内容类型的一部分,一个新的栏"视频中的人"被加入到其中,可以指定视频中的人,作为视频的元数据.当你编辑视频属性时可以查看到该栏.更多信息 二:重建索引 一个 ...

  3. Vue.js 源码学习笔记 -- 分析前准备1 -- vue三大利器

    主体 实例方法归类:   先看个作者推荐, 清晰易懂的  23232 简易编译器   重点: 最简单的订阅者模式 // Observer class Observer { constructor (d ...

  4. select 从应用层到内核实现解析

    在一个应用中,如果需要读取多个设备文件,这其中有多种实现方式: 1.使用一个进程,并采用同步查询机制,不停的去轮询每一个设备描述符,当设备描述符不可用时,进程睡眠. 2:使用多个进程或者线程分别读取一 ...

  5. 判断手机端还是pc端

    public static bool CheckIsMobile() { bool flag = false; string agent = SystemWeb.HttpContext.Current ...

  6. arduino 配置 esp8266

    在连接之前,先把程序下载到arduino中,很简单,就是定义了软口.如果中间要改动程序,要把rx和tx的连线去掉,不然下载程序可能失败. ; ; void setup() { pinMode(rx,I ...

  7. test20181017 B君的第二题

    题意 分析 考场50分 旁边的L君告诉我,求的就是非升子序列的个数,于是写了个树状数组. 但是\(\mod{2333} > 0\)还需要组合数中没有2333的倍数,所以实际上只得了\(a_i \ ...

  8. 转 sql 优化

    1.关于SQL查询效率,100w数据,查询只要1秒,与您分享: 机器情况p4: 2.4内存: 1 Gos: windows 2003数据库: ms sql server 2000目的: 查询性能测试, ...

  9. 【转】每天一个linux命令(26):用SecureCRT来上传和下载文件

    原文网址:http://www.cnblogs.com/peida/archive/2012/11/28/2793181.html 用SSH管理linux服务器时经常需要远程与本地之间交互文件.而直接 ...

  10. RAW+ASM 的RAC 安装文档

    实验平台:Oracle 10gR2 RAC + RHEL 4.0 +VMWare GSX 3.2.0 安装步骤: 1.安装前准备及OS安装配置 2.安装Oracle 10gR2 clusterware ...