Mac搭建PHP开发环境(mamp+phpstorm+xdebug)

OS版本

Paste_Image.png

一.首先下载搭建环境所需要的软件

  1. phpstorm 密码: jebr
    2.mamp pro密码: mhia
    3.chrome
    4.JetBrains IDE Support(chrome插件)

二.安装成功之后配置mamp

1.新建一个server目录
Paste_Image.png

默认会生成以下两个文件

Paste_Image.png

2.mamp是自带xdebug的,因此我们不需要brew来安装xdebug,直接启用

Paste_Image.png

启动serve之后默认会跳转mamp的信息界面

Paste_Image.png

点击菜单栏的phpinfo,边可以看到php的相关配置

Paste_Image.png

然后再

Paste_Image.png

三.配置phpstorm

删掉index.php的所有代码输入一段测试代码

Paste_Image.png

配置项目的运行环境


Paste_Image.png

选择php位置

Paste_Image.png

然后apply ok
修改端口

Paste_Image.png

配置DBCpProxy


Paste_Image.png
Paste_Image.png
Paste_Image.png

四.chromeJetBrains IDE Support Chrome插件并启用

五.打断点调试

Paste_Image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容