XAMPP + Phpstorm + Xdebug 实现断点调试

 

  一、开启XAMPP,使用ThinkPHP建立项目,添加PHP文件phpinfo.php, 写上phpinfo();php

  二、使用Google浏览器地址栏输入:localhost/项目名称/public/phpinfo.php,能够看见php的信息,右键点击查看网页源码,CMD+A / CMD+C所有复制浏览器

  三、在这个网址下 https://xdebug.org/wizard.php 粘贴刚刚复制到信息,点击下方按钮,获得以下图PHP信息:phpstorm

  

  四、按照官方提供 Instructions 中的步骤执行便可实现按照ide

  五、在/Applications/XAMPP/xamppfiles/etc/php.ini 文件中添加信息以下:debug

    [xdebug]
    zend_extension = /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
    xdebug.idekey="PHPSTORM"
    xdebug.remote_handler = "dbgp"
    xdebug.remote_mode = "req"
    xdebug.remote_host='localhost'
    xdebug.remote_enable=on
    xdebug.remote_port = 9000 //这是设置端口 能够改 只要下面这是phpstorm 一致就能够
    xdebug.remote_autostart = no

  CMD + S 保存退出  调试

  六、在Phpstorm配置以下: code

 

  A、配置phporm

  

 

 

  B、配置Debugblog

    

  C、添加Servicesrem

    

  D、添加调试项目

   

  

  

  E、运行

  

相关文章
相关标签/搜索