Zend Studio 如何配置本地apache服务器使用xdebug调试php脚本

本地环境搭配:
apache 2.2 安装位置:D:/program files/Apache Software Foundation/Apache2.2
php 5.2.10 安装位置:C:/php
xdebug已经安装并配置好
zend studio 安装位置:D:/program files/Zend/Zend Studio - 7.0.0
zend studio 默认workbench安装位置:C:/Users/Fred/Zend/workspaces/DefaultWorkspace7
 
配置apache,修改httpd.conf文件,在文件的最后添加:
 
Alias /Workspace "C:/Users/Fred/Zend/workspaces/DefaultWorkspace7"
<Directory "C:/Users/Fred/Zend/workspaces/DefaultWorkspace7">
Options Indexes MultiViews ExecCGI
DirectoryIndex index.php
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
/Workspace这个名字随你喜欢改变
C:/Users/Fred/Zend/workspaces/DefaultWorkspace7这个和你的zend studio默认的workbench位置相对应
 
接下来配置zend studio。打开zend studio => Window => Preferences => PHP
PHP Executables => Add,如下所示设置(name可以随便起名字,但是之后的debug设置里面必须和这个name对应):
 
Photobucket
 
PHP Servers => New,如下所示设置:
 
Photobucket
 
注意URL栏中添加了Workspace,这个是在httpd.conf中添加的目录别名。
 
PHP Debug,如下图所示,选择合适的Debugger,Server:
 
Photobucket
 
原文地址:https://www.cnblogs.com/GaoAnLee/p/4903994.html