当前位置:首页 > !本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试 - 图文
本地环境 XAMPP + phpStorm + XDebug + chrome 配置和断点调试
1、系统环境:
⑴Win7 SP1(Win7 32位),XAMPP_V3.2.1(为 RAR 包直接解压在了E:盘根目录),phpStorm_V 10.0.1安装在C:(默认安装)。
⑵工程文件夹路径为:E:\\xampp\\htdocs\\my_PHP_Web。 2、Apache服务器配置:
⑴在 E:\\xamppx 文件夹中,有个批处理文件:test_php.bat,是测试“Microsoft Visual C++ 2008 runtime package”是否安装并注册。
⑵配置 PHP(php.ini):
在 E:\\xamppx 文件夹中,找到“ampp-control.exe”,双击运行,看到 xamppx窗口,先确定 Apacge 没有启动:
在 xamppx窗口,点击Apache 行的 Config 按钮,选 PHP(pnp.ini):
在pnp.ini 文件末尾,找到XDebug 节,去掉各行前面的注释“分号”,修改“xdebug.remote_enable = 0”为“ = 1”或“ = on”,并在后面加两行:
xdebug.idekey= PHPSTORM
xdebug.remote_mode = \
成为:
[XDebug]
zend_extension = \xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = \
xdebug.profiler_output_name = \xdebug.remote_enable = on xdebug.remote_handler = \xdebug.remote_host = \
xdebug.trace_output_dir = \xdebug.idekey= PHPSTORM xdebug.remote_port = 9000
其中 remote_host 是指调试客户端的地址,即 IDE 所在的 IP,同理 remote_port 是客户端的端口,这两项在远程调试的情况下要注意修改。
⑶保存文件(php.ini),重新启动apache:
⑷检查是否成功开启了 xdebug服务:
a、一种方法为在Shell 窗口的命令行“#”后输入“php\\php.exe -m ”,回车,看到XDebug,说明成功开启XDebug。
共分享92篇相关文档