This Question is Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
3 Replies Last post: Jan 3, 2011 2:06 PM by Nikolay Matveev  
Andrew Kreps Newbie 59 posts since
Dec 30, 2010
Currently Being Moderated

Dec 30, 2010 2:58 AM

Debug: Mapping on local server MVC frameworks

I'm jumping into the fray on the latest and greatest 102.18 debug fun.  I've been reading all of the threads and blog posts on debugging and I'm still unable to make it work, since about the 98 series.  I'm running a local copy of apache, and my project root and web root are one and the same.

 

At the moment, I can listen to and receive requests from my browser to the PhpStorm IDE.  The requests show up as tabs in my debug pane, with the proper output, and it briefly rolls through index.php and then disconnects the debugger.  My code with the breakpoints, while it does run, doesn't break.  If I put a breakpoint in index.php, I end up with a mapping error that reads a bit strange:

 

Cannot find a local copy of the file on server /Users/me/project/www/index.php

Local path is /Users/me/project/Users/me/project/www/index.php

 

Notice the double pathing?  I've edited the mappings to both specify index.php explicitly, and to simply add my project root as /, and neither fixes the problem.  If I remove the mapping altogether, the breakpoint in index.php stops working as well. 

 

I feel certain this is a mapping issue with my configuration, but I could use some assistance in working out the details.  Do you have any hints?

ChrisK0 Newbie 4 posts since
Dec 27, 2010
Currently Being Moderated
Dec 31, 2010 11:47 PM in response to: Andrew Kreps
Re: Debug: Mapping on local server MVC frameworks

There are a couple of other usability issues related to setting up local servers on OS X.  PhpStorm forces you to set the link to the PHP bin every time for each project.  Also, the main "Run" dropdown menu has two "Run" and "Debug" options but it isn't clear why they are different, and why sometimes only one is available.  Finally, I haven't been able to preview pages in browsers -- MAMP apache is working and I can get to the page directly through a browser, but the preview in browsers menu doesn't appear in phpStorm.

Nikolay Matveev Apprentice 697 posts since
Apr 14, 2010
Currently Being Moderated
Jan 3, 2011 2:06 PM in response to: ChrisK0
Re: Debug: Mapping on local server MVC frameworks

Hello ChrisK0,

 

PhpStorm forces you to set the link to the PHP bin every time for each project.

I created an issue for that. Please vote - http://youtrack.jetbrains.net/issue/WI-4627

 

Also, the main "Run" dropdown menu has two "Run" and "Debug" options but it isn't clear why they are different,

'Run' for simple executing of script and 'Debug' for executing script under one of the supported by PhpStorm debug extensions - XDebug or Zend Debugger. Running a script under debug allows you to set breakpoints and get script stopped on them.

 

and why sometimes only one is available

Maybe it relates to http://youtrack.jetbrains.net/issue/WI-4547. This issue is fixed. Feel free to create a bug request in our tracker http://youtrack.jetbrains.net/issues/WI if you know about other cases.

 

Finally, I haven't been able to preview pages in browsers -- MAMP apache is working and I can get to the page directly through a browser, but the preview in browsers menu doesn't appear in phpStorm.

You should configure at least one deployment server and mark it as default. Then the action "open in Browser" become available for you.

 

Thank you for feedback!

More Like This

  • Retrieving data ...