您当前的位置: 首页 >  php

插件开发

暂无认证

  • 1浏览

    0关注

    492博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

phpstorm-phpstudy-xdebug-环境搭建-调试-helloworld

插件开发 发布时间:2022-09-28 09:51:29 ,浏览量:1

文章目录
    • 1.安装phpstudy
    • 2.配置xdebug
    • 3.安装phpstorm
    • 4.设置phpstorm
    • 5.添加页面
    • 6.调试

1.安装phpstudy

首先从官网下载phpstudy,按默认步骤安装在系统。安装后打开如下所示: 在这里插入图片描述

2.配置xdebug

在管理面板右键,打开xdebug插件。 在这里插入图片描述 找到xdebug模块所在位置,如下图所示: 在这里插入图片描述 打开php.ini进行配置。如下图所示: 在这里插入图片描述 拉动最下面,发现如下代码。

[Xdebug]
zend_extension=D:/phpstudy_pro/Extensions/php/php7.0.9nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=Off
xdebug.trace_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.0.9nts.xdebug.trace
xdebug.profiler_enable=Off
xdebug.profiler_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.0.9nts.xdebug.profiler
xdebug.remote_enable=Off
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

将xdebug.remote_enable=Off改为xdebug.remote_enable=On,如下所示:

[Xdebug]
zend_extension=D:/phpstudy_pro/Extensions/php/php7.0.9nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=Off
xdebug.trace_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.0.9nts.xdebug.trace
xdebug.profiler_enable=Off
xdebug.profiler_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.0.9nts.xdebug.profiler
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req

在根目录(D:\phpstudy_pro\WWW)新建一个index.php文件,使用记事本输入如下内容:

            
关注
打赏
1665481431
查看更多评论
0.0373s