Docker debug problem : "Remote file path '/home/www/Standard input code' is not mapped to any file path in project"


I tried to configure Xdebug to use it with phpstorm and my project which is on a docker container, but is doesn't behave as I expected.

When launching the debug of any method, a new "Standard input code" sub-tab opens in the debug tab with this message : "Remote file path '/home/www/Standard input code' is not mapped to any file path in project"

As this doesn't mean anything to me, I suppose I misconfigured something but I don't know what.

Anyway, the debug is working if I uncheck the "Force break at first line when no path mapping specified" checkbox in Languages & Frameworks > PHP > Debug, but instead of showing the debug result in the original debug tab, a new "Standard input code" sub-tab is still opened and the results are in here... Not a big deal as it seems to work but I don't think this is the expected behavior.

Here is my config:

Here the remote debugger config (lkb-docker-dev is the hostname of the container running php with xdebug):

The debug validations says everything is ok.

Any idea on how to solve this? Thanks!

Comment actions Permalink

Basically, you've found the solution - disabling force break when there are no mappings.

It appears that your project creates some kind of a virtual file that is executed by the interpreter, this file for obvious reasons does not exist on your local machine.
You can't exclude this file from execution, hence the only way around is to ignore its presence, and that's exactly what you did.

Update: you can try adding this virtual file to Languages & Frameworks | PHP | Debug | Skipped Paths, but I am unsure whether it's going to help or not.

Update 2: nope, no point in trying - skipped paths only work for mapped stuff.

Comment actions Permalink

Ok thanks for your help, I will keep this option unchecked!


Please sign in to leave a comment.