In PHPStorm, I want to debug a PHPUnit class. If I set a breakpoint in a method of the unit-testing class (the class that inherits from PHPUnit_Framework_TestCase
), whenever I run the test, PHPStorm executes the test, but never stops at the breakpoint, even though there are breakpoints in other places where it used to stop.
Is that a bug in PHPStorm ? how to stop in a PHPUnit_Framework_TestCase
's method ?
in order PHPStorm to stop at the breakpoint within tests you must "Debug" (Shift + F9) but not "Run" (Shift + F10) your configuration.
If your test case has the @runInSeparateProcess comment or in the phpuint.xml configuration file the <phpunit processIsolation="true">
tag has the processIsolation attribute and the value of it is true than debugger will not stop on the breakpoint because it is running in a separate thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With