槽痞

使用postman时phpstorm如何debug?

很多人不知道的是,php框架如thinkphp,laravel等都是可以debug的。

首先需要下载对应的xdebug配置文件,并且在在php.ini中配置好相关参数

附xdebug配置:

[XDebug]
xdebug.profiler_output_dir="D:\phpStudy\tmp\xdebug"
xdebug.remote_enable=1
xdebug.trace_output_dir="D:\phpStudy\tmp\xdebug"
xdebug.remote_host=app.cn //给框架配置的配置的vhost
zend_extension="D:\phpStudy\php\php-7.1.16-nts\ext\php_xdebug.dll"
xdebug.idekey = "PHPSTORM"

xdebug.profiler_enable_trigger_value=PHPXDEBUG
xdebug.profiler_enable_trigger=1
xdebug.profiler_enable=on
xdebug.remote_connect_back=on

-------------更新phpstorm下cli模式的debug----------------------

php -dxdebug.remote_enable=1 -dxdebug.remote_autostart=on -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 artisan my:command

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »