简体   繁体   中英

PhpStorm Debugging Project with Subdomains

I am searching for a solution for an issue which I assume a lot of you have: Debugging with PhpStorm several Subdomains.

Our project lives in an environment where we have several country/language bases country subdomains. eG: france.myproject.com , spain.myproject.com , uk.myproject.com , etc.

Our local testing environment tries to stick to that, so locally we got something similar. Like fr.myproject.dev , es.myproject.dev , etc.

When debugging with PhpStorm - as of now - I have to go to "Settings | Languages & Frameworks | PHP | Servers" and add a server with path mappings for each subdomain and port. So I end up creating an entry for each, which looks like...

fr.myproject.dev (http)
fr.myproject.dev (https)
es.myproject.dev (http)
es.myproject.dev (https)

etc... I tried using a * as wildcard for the subdomain. But that didn't work out. I tried using only domain myproject.dev - didn't work out either.

Has anyone solved this problem by any chance?

It's not wildcard support, but I've found that many settings - including path mappings - can be added to a deployment, which can be shared between servers.

If you visit Settings > Build, Execution, Deployment > Deployment , you can create an "In Place" deployment in your web root. From there, you can specify mappings.

When you first debug using one of your .myproject.dev subdomains, you can select Import mappings from deployment , which will automatically use the mappings you defined earlier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM