I am trying to debug my Codeception tests.
My debug platform using PHPStorm + XDebug is working great when using from browser with the right IDE-KEY as cookie.
However, when trying to debug codecept using the CLI I encounter the following problem:
- If I put a breakpoint in my Cest class, behavior is normal. I am able to skip functions and click "Resume" to stop debugging.
- But whenever I put a breakpoint that is in my code (I.E controllers or my namespace classes), xdebug becomes unusable:
If I try to Resume, Step Out or Step Over, xdebug ignores my request and always Steps Into the current line.
This makes my testing really difficult to go on with.
I have tried using two platforms: Both my usual vagrant + nginx + php5-fpm (with remote debug), and also wamp (local debug).
Any help would be appreciated!
--
Update: Well, this has nothing to do with Codeception. I tried testing just with PHPUnit and the same happens. Doesn't seem to be an issue with the CLI also, since I tried debugging PHPUnit from the browser, with no luck.
I thought maybe it's a PHPStorm bug, but looking at the xdebug log, I see the correct methods are called:
<- step_over -i 41
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_over" transaction_id="41" status="break" reason="ok">
step_over is called, not step_into. So maybe a bug with xdebug?
Weird thing is, this isn't always happening. After changing configurations it sometimes doesn't happen, but then the bug seems to be coming back...