I'm running a Symfony server with PHP7.3.33 & Xdebug 3.1.5 on a Debian Windows Sub-System Linux. I use PhpStorm on my Windows to code and I wanted to also use it to debug with Xdebug.
I had trouble to configure my Xdebug on my server but I managed to make it recognised by PhpStorm.
Then when I make a call to my server by loading a page, it stop on multiple files but not on my breakpoints. It also display me this error.
Cannot find a local copy of the file on the server /home/pierrem/.symfony5/php/4cddbar1067c22542bca91af1a7693a48ce69eea-router.php
Local path is //home/pierrem/.symfony5/php/4cddbar1067c22542bca91af1a7693a48ce69eea-router.php
I've tried to fix this issue by opening the project from
\\wsl$\Debian\home\XXXX and W:\home\XXXX but it changed nothing.
EDIT: I started the server using php -S localhost:8000 and the debugger is working but only in my index.
When i try to put a breakpoint on my controller, it will display with an error and no stop on this breakpoint:
File path is not mapped to any file path on server. Edit path mapping to fix the problem.
I tryed to update my PhpStorm servers config as follow but this is still not working.




***-router.phpseems to be generated on request / every time you make a change in your code. When the request comes in and you see that popup (on 2st screenshot), the IDE does not see that file (it shows no file option, onlyneocampusproject). I'm not sure how it can be solved if the IDE does not do automatic "refresh" at that moment. I just know that using proper web server resolves that issue (as the request is not handled by Symfony's server then)***-router.phptemp file that makes the whole thing to fail. Maybe you can disable creating them somehow (not using Symfony myself so cannot advise)hostshould be just host name, not the port. The path mappings is the same - makes no sense to me. I may only suggest to delete ALL entries there, try to debug and let the IDE create one for you (will be done from that dialog that popups on the 1st screenshot). TBH I do not think it can be solved here (as per my link earlier). Not sure at all.