How to set up project

Hello,

I've got a question how to set my my project. I use the following setup:

My computer is running win xp. I use a local vmware to run the a linux with apache, mysql and so on. The htdocs-directory is exported via samba and mounted on the host, my win xp.
So I can access the php-file like local files.

I use File->New Project from existing Files to import a project. Then I'm asked for the scenario. If I use the first one 'My web server i son the same machine, files are under the servers's root' no files are copied. But when I want to debug a file the current line is not highlighted. The browser opens up the blank page and I can step through the code using F8 but the blue line indicating the current line is not visible. Breakpoints don't work, too.

If I choose 'My web server is on remote host, files are accessible via network share or mounted drive' (what is actually the set up I use) the whole htdocs-directory seems to be copied. Where are the files copied to? Is there a way to exclude directories? I have only a way to exclude files via pattern in one line.
Can I use this setup without the local copy?

Thanks,
Jerry

1 comment

Hello Jery,

Can I use this setup without the local copy?

To provide code assistance (resolve, completion, syntax checking etc.) PhpStorm needs really fast access to source files, so it's strongly recommended to have project files located in local filesystem, not in mounted folder. So the advice is to choose '...files are accessible via network share' scenario.

Where are the files copied to?

You choose local folder for project files on 'Specify Local Path' wizard page.

Is there a way to exclude directories?

Unfortunately, as of PhpStorm 1.0.1 there's no way to exclude certain folders from copying. Please watch/vote the issue http://youtrack.jetbrains.net/issue/WI-2226  to be notified when it's supported. Current workaround will be to specify corresponding pattern - will help if the names of the folders to exclude are unique.

But when I want to debug a file the current line is not highlighted

When debugging the project on a Local server ('My web server is on the same machine' scenario), PhpStorm assumes that local paths on server exactly match the paths in project, which is certainly false (e.g. local path in project is C:\Mount\MyProject\index.php, while local path on server (vmware box) is /opt/apache/htdocs/MyProject/index.php). To solve this, you have to click 'Server path mappings...' button on your run configuration page, and specify the mapping yourself.

Again, in '...files are accessible via network share' scenario there should be no problems with debugging.

Regards,
Kirill

0

Please sign in to leave a comment.