环境:phpstorm + phpstudy +xdebug + 火狐

    phpstudy自带xdebug
    其他选项菜单 —> PHP扩展及设置 —> PHP扩展 —> Xdebug

    设置php.ini(一定要是你php运行版本环境下的php.ini), 设置完毕务必重启服务

    1. [XDebug]
    2. xdebug.profiler_append = 0
    3. ;效能监测的设置开关
    4. xdebug.profiler_enable = 1
    5. xdebug.profiler_enable_trigger = 0
    6. ;profiler_enable设置为1的时候,效能监测信息写入文件所在的目录
    7. xdebug.profiler_output_dir="D:\phpStudy\tmp"
    8. ;设置的函数调用监测信息的输出路径
    9. xdebug.trace_output_dir="D:\phpStudy\tmp"
    10. ;生成的效能监测文件的名字
    11. xdebug.profiler_output_name ="cache.out.%t-%s"
    12. ;IDEXDebug协作,端口设置不要冲突其他服务
    13. xdebug.remote_enable = on
    14. xdebug.remote_handler = "dbgp"
    15. xdebug.remote_host = "127.0.0.1"
    16. xdebug.remote_port = 9010
    17. xdebug.idekey = phpstorm
    18. ;远程断点自动打开
    19. xdebug.remote_autostart = on
    20. ;.dll文件的路径,ext文件下自带xdebugdll文件
    21. zend_extension="E:\PhpStudy\PHPTutorial\php\php-7.1.13-nts\ext\php_xdebug.dll"

    phpstorm设置
    File —> Settings
    image.png

    设置PHP环境(要与运行调试版本一直)
    image.png

    IDE key 设置要与php.ini 的xdebug.idekey一致
    image.png

    image.png

    phpinfo 页面会出现xdebug版本与IDE key,表示成功
    image.png

    火狐浏览器安装插件
    image.png

    image.png