PhpStorm映射路径 [英] PhpStorm mapping paths

查看:462
本文介绍了PhpStorm映射路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置具有SSH和FTP访问权限的docker容器.

I'm setup a docker container with SSH and FTP access.

我的本​​地项目如下:

My local project looks like this:

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

/Users/gezimhome/projects/ziprecipes.net/zip-recipes is my project dir. The source code for my WordPress plugin is in src folder. I have wordpress downloaded and extracted locally here in /Users/gezimhome/projects/ziprecipes.net/workdir/wordpress.

这是我的部署设置:

Here are my deployment settings:

我的映射:

我的服务器:

在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.

In the docker container, wordpress is downloaded and uncompressed here: /usr/share/nginx/html/wordpress/ and I map /Users/gezimhome/projects/ziprecipes.net/zip-recipes/src to /usr/share/nginx/html/wordpress/wp-content/plugins/zip-recipes when creating the container.

Xdebug的设置正确,因为我得到以下Incoming Connection from Xdebug屏幕:

Xdebug is setup properly because I get this Incoming Connection from Xdebug screen:

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

So, question is, since I already have the mapping why does it keep bothering me to do a mapping for wordpress files?!

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

And the bigger question is, why are my breakpoints in my plugin not being hit at all?!

请帮助:(

推荐答案

设置Server时,Host需要与服务器主机名匹配.就我而言,我将服务器主机设置为zrdn:

When setting up a Server the Host needs to match server host name. For my case I set server host to zrdn:

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

The web server needs to have the server name configured as well. In my case, I configured nginx like so:

server {
        listen   8080;
        server_name zrdn;
        ...

感谢一百万,@ LazyOne!

Thanks a million, @LazyOne!

这篇关于PhpStorm映射路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆