How do I set up PhpStorm for plugin development Can someone explain how to set up PhpStorm so that I can use it to develop/debug a plugin? I have


local webserver set up
craft files in the usual place above the webroot


The new project wizard gives me a choice between "Web server is installed locally, source files are located under its document root" and "Web server is installed locally, source files are located elsewhere locally. (Source files are copied to project root, then synchronized with server when necessary.)" Neither of which seems quite right.

Directory structure:


craft


app
plugins


myplugin


public &lt;== this is webroot


.htaccess
index.php
I point File-&gt;Open Directory at craft/.., and PhpStorm pick up everything for me. You probably have to set up path mappings to make debugging work properly, but PhpStorm will alert you to that and launch the mapping UI.

I have a sandbox Craft install running at local.sandbox.dev and I create a git repo in the plugins directory, and develop the plugin in there. That way I can have multiple plugins in this sandbox, all with different repos, whereas the Craft install itself is not version controlled. Makes it easy also to dump the entire installation and replace it whenever the database becomes too mangled.