4
votes

I'm currently trying to debug an Symfony 2 powered application using XDebug on my local home server. Everything appears to be set up correctly as I'm able to set breakpoints within the app_dev.php file and step through them accordingly.

However any breakpoints set within a bundle's controller get ignored.

The corresponding URL is http://myapp.local/product-name/

Does anyone know what could be causing the breakpoint to be skipped?

Thank you.

2
The only thing I know that is able to make breakpoints to be "skipped" is a human error mistake... Please postr the code of your Controller and the location of breakpoints. Have you checked that controller action is called with a var_dump ? - AlterPHP
Most likely incorrect/incomplete path mappings (see Settings | PHP | Servers*). Also -- try xdebug_break() function instead of breakpoint in such "unhittable" file -- if path mappings are incorrect PhpStorm will ask to set them up. - LazyOne
What IDE are you using? I had same problem with netbeans. - smoreno
The path for my symfony web directory was set but not the one for the symfony root folder in Settings > PHP > Servers. Changing this solved the problem for me. - Scotty Waggoner
@OzzieOrca, not everyone use PHPStorm :-) - programaths

2 Answers

1
votes

Check if your folder is symlinked. If yes - you should define proper path in your IDE.

Also as LazyOne said xdebug_break(); works even in symlinked folder;

0
votes

Does anyone know what could be causing the breakpoint to be skipped?

Nothing. The breakpoint is not skipped. The code is just not executed (in debugging mode) at that point.

Take care you have got an active debugging session.

Also if you want more specific help, post the code in question (you probably have set a breakpoint on a line where the debugger does not stop) and the exact steps you do for debugging.