While developing using Codeception I often happen to use PhpStorm to debug it; it’s a CLI application and as such requires some special care.
This withstanding the CLI will remain stuck on its headers when PhpStorm is listening for debug connections.
I’ve found a quick fix is to disable the debug mode in PhpStorm: the debug will happen anyway and execution will stop at breakpoints as intended but the CLI application will run. I do not know why this happens but it works all the times.
Another check is to make sure there are no processes waiting for PhpStorm to give them the go signal by issuing the “Run” command of PhpStorm until the Debug menu appears.