$ProjectFileDir$ problems

I am trying to use $ProjectFileDir$ with an external tool command but it doesn't alway work reliably.  

It either works as I'd expect and its the directory for the base of the dirctory I have opened as a project.

Or it seems to be set to an empty string (blank).

Am I doing something wrong? Or is this possibly a bug?

I am using the latest phpstorm on mac os 10.7.5

I checkout the php code using terminal and svn, then open up the new directory with the phpstorm command line tool. We have existing SVN code managment systems in place to where I need to use terminal to get the bare project setup then load the existing directory into phpstorm.  

Again sometimes it works and sometimes its empty.

Comment actions Permalink

Hi Kellas,

I'm on Windows and it always worked for me. Hovewer I have found few tickets that mention similar issue (most of them on Mac):

Please check your idea.log (Help | Reveal Log in ...) for any clues (attach here if desired).

And by "latest version" you mean 5.0.4 or v6 EAP (build 124.509) ?

Comment actions Permalink

Its phpstorm 5.0.4
Build #PS-121.390
Built on October 30, 2012

Thanks for the clue to the idea.log file.

Tomorrow, I'll do some more testing and preserve the idea.log files and post my findings or lack thereof.

Comment actions Permalink

Here are my testing findings.

The answer appears to be: Do not open a an existing project with phpstorm command line launcher. (pstorm)

The first time I open a directory with the pstorm it $ProjectFileDir$ is properly set.  If I close phpstorm and reopen the same directory with pstorm, $ProjectFileDir$ is is not set.
If instead i simply launch phpstorm from either the Mac OSX gui or from executing pstorm without any parameters. $ProjectFileDir$ for this existing project seems to always work properly.

I've attached 3 idea.log files. But I don't think they contain any useful information.

idea-test1-A.log is the log file from the first time I opened a given project directory with pstorm (and $ProjectFileDir$ is set as expected)

idea-test1-B.log is the log file from the second time I opened a given project directory with pstorm (and $ProjectFileDir$ is WAS NOT set as expected)

idea-test1-C.log is the log file from the third time I opened phpstorm but was from the mac osx gui (and $ProjectFileDir$ is set as expected)

Comment actions Permalink

It will be nice once this issue is fixed but my current work around is sufficient.

I simply immediatly reopen the project with File->Open Directory.   


Please sign in to leave a comment.