Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpstorm xdebug with a symfony2 project

I am trying to debug a symfony2 application with xdebug and phpstorm.

My local development environment is Ubuntu 14.04 with apache2 and Xdebug version is 2.2.7

I have this working on another php (not symfony2) projects with the following guides:

https://www.jetbrains.com/phpstorm/help/configuring-xdebug.html

https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

When I execute the bookmarlet to set the cookie and start debugging this symfony2 project phpstorm detects the incoming connection (which I accept), but nothing else happens. It doesn't stop in any breakpoint.

I have the symfony2 phpstorm plugin. I tried to disable it and get nothing as well.

This answer looked good to me, but it didn't the trick either

Last thing I tried is to change the Servers debug configuration, disabling path mappings. This way phpstorm starts debugging, but it breaks in app_dev.php file instead of any breakpoint I have set.

I am stuck here, any idea would be appreacite

UPDATE

More information I didn't mention:

  • I am using firefox I am trying to debug dev environment
  • Breakpoints are in an action in controller of my own, not vendor ones.

UPDATE

Here is my xdebug configuration

[XDebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="<AMP home\tmp>"
like image 930
hosseio Avatar asked Apr 16 '15 09:04

hosseio


1 Answers

I also had to comment out the loading of class cache (symfony 2.7). I did it temporarily in the web/app_dev.php

//$kernel->loadClassCache();

Otherwise the debugging took place in bootstrap.php.cache or breakpoints did not work.

like image 185
FlorIT Avatar answered Oct 13 '22 19:10

FlorIT