I'm struggling to get Xdebug to work in a PHP test file on PhpStorm 2020.
I need to debug some tests class along with the Xdebug extension, but I always get this :
Cannot find file '/project_path/Standard input code' locally.
To fix it set server name by environment variable PHP_IDE_CONFIG and restart debug session.
I tried everything I found on the web to fix it, but nothing seems to work in my case.
I tried to set PHP_IDE_CONFIG
as an environment variable and set to localhost
, also add localhost server in the IDE but still nothing works. My colleagues didn't have to make any specific configuration to get Xdebug to work in their IDE.
The "normal" PHP files work, I have this issue only on test files.
Any idea ?
Xdebug sees this bogus file Standard input code
and sends us the debug data for it. Since we have no idea where to map it to, we show you the error message.
You can work the issue around by configuring PHP | Servers
mappings manually and then unchecking PHP | Debug | Break at first line when no mapping specified
.