文章目录
1.安装phpstudy
- 1.安装phpstudy
- 2.配置xdebug
- 3.安装phpstorm
- 4.设置phpstorm
- 5.添加页面
- 6.调试
首先从官网下载phpstudy,按默认步骤安装在系统。安装后打开如下所示:
在管理面板右键,打开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文件,使用记事本输入如下内容:
关注
打赏
最近更新
- 深拷贝和浅拷贝的区别(重点)
- 【Vue】走进Vue框架世界
- 【云服务器】项目部署—搭建网站—vue电商后台管理系统
- 【React介绍】 一文带你深入React
- 【React】React组件实例的三大属性之state,props,refs(你学废了吗)
- 【脚手架VueCLI】从零开始,创建一个VUE项目
- 【React】深入理解React组件生命周期----图文详解(含代码)
- 【React】DOM的Diffing算法是什么?以及DOM中key的作用----经典面试题
- 【React】1_使用React脚手架创建项目步骤--------详解(含项目结构说明)
- 【React】2_如何使用react脚手架写一个简单的页面?