PhpStorm映射路径

时间:2016-03-07 05:38:34

标签: php wordpress debugging docker phpstorm

我设置了具有SSH和FTP访问权限的docker容器。

我的本​​地项目如下:

/Users/gezimhome/projects/ziprecipes.net/zip-recipes是我的项目目录。我的WordPress插件的源代码位于src文件夹中。 我在/Users/gezimhome/projects/ziprecipes.net/workdir/wordpress中在本地下载并提取了wordpress。

以下是我的部署设置: enter image description here

我的映射: enter image description here

我的服务器: enter image description here

在docker容器中,wordpress会在此处下载并解压缩: /usr/share/nginx/html/wordpress/我在创建容器时将/Users/gezimhome/projects/ziprecipes.net/zip-recipes/src映射到/usr/share/nginx/html/wordpress/wp-content/plugins/zip-recipes

Xdebug设置正确,因为我得到了这个Incoming Connection from Xdebug屏幕: enter image description here

所以,问题是,因为我已经有了映射,为什么它一直困扰我为wordpress文件做映射?!

更大的问题是,为什么我的插件中的断点根本没有被击中?!

请帮助:(

1 个答案:

答案 0 :(得分:2)

设置Server时,Host需要匹配服务器主机名。对于我的情况,我将服务器主机设置为zrdnenter image description here

Web服务器也需要配置服务器名称。就我而言,我这样配置了nginx

server {
        listen   8080;
        server_name zrdn;
        ...

万分感谢@LazyOne!