第九节 PHP 跟踪调试代码 XDebug
最后更新于:2022-04-02 01:47:13
>[success] # PHP 跟踪调试代码 XDebug
- [下载XDebug扩展](https://xdebug.org/download.php)
- 下载对应PHP版本的Xdebug

- 线程安全(TS)和非线程安全(NTS)

- 安装Xdebug扩展-php.ini
```
[XDebug]
xdebug.profiler_output_dir="D:\phpStudy\tmp\xdebug"
xdebug.trace_output_dir="D:\phpStudy\tmp\xdebug"
zend_extension="D:\phpStudy\php\php-7.1.7-nts-64\ext\php_xdebug-2.5.3-7.1-vc14-nts-x86_64.dll"
xdebug.idekey=PHPSTORM
xdebug.remote_port=9005
xdebug.remote_enable=on
```
- 配置PHPStorm


- 配置Debug

- 运行Debug

- 调试

- return 处 Step into F7 跳进去
> ### 相关阅读
- [为PHPStorm配置Xdebug调试环境](http://blog.csdn.net/zhyh1986/article/details/45172685)
- [Configure Xdebug Helper for Chrome to be used with PhpStorm](https://confluence.jetbrains.com/display/PhpStorm/Configure+Xdebug+Helper+for+Chrome+to+be+used+with+PhpStorm)
';