1 Replies Last post: Sep 3, 2013 3:32 PM by Andriy Bazanov  
Mark Schneider Newbie 2 posts since
Sep 3, 2013
Currently Being Moderated

Sep 3, 2013 3:04 PM

Xdebug doesn't work properly with phpstorm



Trying to set up XDebug with PhpStorm. I installed and configured it following this guide: https://jtreminio.com/2012/07/xdebug-and-you-why-you-should-be-using-a-real-debugger/


At the moment it looks like that. I start a session, PhpStorm ask or  asked me what connection to listen. There was just one file to select.  app_dev.php (It's the index from Symfony) so I selected it. Wondering  why there is just one file. Now I can only debug this only file.  Everythign else doesn't work. Later, the pop up came again and I  selected the project folder, but still. I can just debug the app_dev.php  file. What is wrong with my settings?


I also heard, I can make the debugging without having to set the session, is this true? VIa xdebug.remote_autosrat = 1?


Xdebug php info: http://pastebin.com/LQGY7t0E Xdebug php.ini settings: http://pastebin.com/8WjKWDZk The settings in phpstorm are like this https://jtreminio.com/assets/posts/2012-07-05_xdebug-and-you-why-you-should-be-using-a-real-debugger/phpstorm.php_.debug_.png but I do have a external connection settings because i have anewer version. (I guess). Leave it as default.


I'm using ubuntu instaleld on a VM. I'm on Win7. I created a network map to Z: and connected with phpstorm to Z:


So, any hints on how a I can get it working?

Andriy Bazanov Master 5,100 posts since
May 28, 2010
Currently Being Moderated
Sep 3, 2013 3:32 PM in response to: Mark Schneider
Re: Xdebug doesn't work properly with phpstorm

Hi there,


Any symbolic links used (especially on remote machine)?


Xdebug works with resolved/real paths ONLY. It can easily "break" debugging process since IDE will not be able to map remote path to a corresponding local file (if wrong path is provided). Therefore if you have your project in (for example) /www/mysite .. but it is a symboli link to (lets say) /var/www/mysite .. then this second path should be used when specifying mapping for debugger (Settings | PHP | Servers).


No need to map every single file -- parent folder is enough (as long as no symbolic links in use).



In any case: there is no enough info to suggest anything specific (my only suggestion so far is not properly mapped paths ... or breakpoint is placed on a line where xdebug itself is unable to break).


Therefore: please collect debugger logs (from both PhpStorm side as well as xdebug) and attemp to debug your code:



Make sure that log files are empty before starting debugging -- will be easier to analyze (no previous debug session info etc).



I suggest attempting to debug some simple site first (1 master file that would include 2-3 simple include files in different folders) -- see if that works first.

More Like This

  • Retrieving data ...