I'm unable to properly run Codeception tests that make requests to my PHP app and trigger Xdebug break points as a result of these requests. I can get Xdebug to stop on the break points but no Codeception results are returned to the PHPStorm interface.
I'm running my PHP app in a VirtualBox VM. I've setup a remote PHP interpreter for the VM. XDebug works fine when I make HTTP requests to my app from my browser. XDebug also works fine if I ssh into the VM and make a cURL request to my app. Debugging a codeception test also works fine with the remote PHP interpreter.
The problem arises when I attempt to run Codeception tests from PHPStorm. PHPStorm executes the test via the remote interpreter, the test makes HTTP calls to my PHP app (which are essentially calls to the local server because Codeception and PHP app are being executed in the VM), PHPStorm pauses at break point, request completes but no test results are returned to PHPStorm.
My settings are as follows:
XDebug on VM
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_host = 192.168.1.104 //IP address of my host machine.
xdebug.remote_connect_back = 0
PHP server config
Remote interpreter config
Codeception run config
Debug window when running Codeception test from PHPStorm:
- Unconfigured 'codeception.php' tab pops up when I haven't configured that debug. I presume this is the PHPStorm helper file that gets uploaded to the VM.
- Unconfigured 'index.php' tab pops up which shows the details when stopping on a break point.
- No break points ever show in the config I setup called 'Xdebug - VM' - this is the one I would expect the break points to show in.
Error message that pops up everytime:
Further to this, when I'm 'listening for new connections', each debug session opens up a new debugging tab:
Any help would be appreciated.