Code tracing with Magento 2

I'm currently evaluating PHPStorm for use with Magento 2 development at work instead of using Eclipse.  I wanted to take a look at PHPStorm because I've heard that's what the Magento folks themselves use.  So far I've been really happy with the IDE.  It especially like the Git features it has. However, I've run into an issue. 

In Eclipse, I can ctrl-click on a function call and get taken to that function's declaration so I can trace the code and see what's going on.  But for whatever reason, I can't get PHPStorm to do the same thing.  When I open a file in PHPStorm that I know I can trace in Eclipse, all I get is a message that says

"Method 'doSomethingCool' not found. Referenced method is not found in subject class."

I ran the 'Detect PSR-0 Namespace roots" which came back and labeled the vendor and app/code folders as PSR-0 roots (which I'm assuming was correct) and then ran "Invalidate Cache/Restart" to reindex but I still get the same message.

Any ideas what I need to do to get the ctrl-click tracing to work correctly?

Vladimir Luchansky
Comment actions Permalink


It would be great to look at the project code.

Would it be possible to share some sample project with us (or provide steps to create and reproduce it)?

Comment actions Permalink

More or less I'm working with a custom module that I built with Magento CE 2.0.4, but I'd rather not share the code in a public forum.  Is there a way I could email you the modules directly?  The Magento CE 2.0.4 code can be downloaded from or you can clone their repo from  Then you would just need to drop my module in the app/code folder, auto detect PSR-0 namespace roots, reindex, and you'd be pretty much where I'm at now.


Please sign in to leave a comment.