How to debug a Flow application with Xdebug and PHPStorm

How and where do I have to place debugging breakpoints when debugging a Flow application with Xdebug within PHPStorm. The only breakpoints that work for me are those I place (for testing purpose) in Web/index.php.

Breakpoints placed in e.g. Packages/Application/Foo.Bar/Classes/Foo/Bar/Controller/StandardController.php or Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Foo_Bar_Controller_StandardController.php do not lead to a break.

Is there a current tutorial/article that explains how to debug a Flow application with e.g. Xdebug and PHPStorm?

Note: Debugging my Flow application using xdebug_break() in PHPStorm works - but I would like to use breakpoints in PHPStorm instead of xdebug_break().

works fine for me. Probably some mapping configuration issue. What I usually do to avoid working in the proxy classes is to put a xdebug_break(); statement in my code that will then be compiled into the proxy class as well and voila result in the break there.

Your were right - this was a mapping configuration issue. Thx.

I will now check if it is more convenient to either [1] use breakpoints in proxy classes or [2] use xdebug_break() in the original classes.

I read about a debugproxy script modified by Sebastian Kurfürst - is this something that still works? What is it? Where can you find it? How can you use it?

lets see if @sebastian has anything to say. AFAIK it’s unmaintained since years and doesn’t work. If someone has C knowledge that could be refreshed I guess.

Hey,

yeah, it is unmaintained since a few years; but one does not need any C knowledge – as it is just a PHP script living at https://github.com/sandstorm/debugproxy
:wink:

Feel free to submit PRs; or if somebody would like to take it over I’d be more than happy in providing guidance on the current code.

All the best,
Sebastian

We just published our Debug Proxy based on Go, pretty fast and stable for us, tested only with PhpStorm en Flow master, 3.0 and 2.3.

Warning currently require a patch for Flow: https://review.typo3.org/#/c/40794

Feel free to open issue, send beers or just comments and improvement suggestions are welcome as usual

Typical output of the proxy in verbose mode, can even be used to learn our xdebug work :wink:

2 Likes

Seems to work, as this gist shows: https://gist.github.com/michaelgerdemann/7a4e2f5315c19ff6f896 (by @michael_gerdemann)

Merged some important fix today, more stable then ever. The joy to use xDebug is back :wink: