Local debug problem - Remote file path is not mapped
On my Linux box (OpenSuse Leap 15.1) Apache2 serves vhost with
DocumentRoot "/srv/www/htdocs/sub.domain.lan"
ServerName sub.domain.lan
The actual files lives at ~/www/htdocs/sub.domain.lan
connected via symlink to /srv/www/htdocs/sub.domain.lan
In the welcome screen I chose
New Project From Existing Files
Web server is installed locally, source files are located under its document root
Project root: ~/www/htdocs/sub.domain.lan
Name: sub.domain
Webserver URL: http://sub.domain.lan
Web path for project root: /
Project URL: http://sub.domain.lan/
PhpStorm shows directory tree. I click the symbol to listen to debug connections.
When I request "http://sub.domain.lan/index.php" PhpStorm does not know the file and shows a dialog to choose from serveral index.php. Breakpoints are working.
When I request "http://sub.domain.lan/test/index.php" PhpStorm Eventlog shows: "Debug session was finished without being paused. It may be caused by path mappings misconfiguration or not synchronized local and remote projects. To figure out the problem check path mappings configuration for 'f63.lan' server"
In that dialog I check "Use path mappings" and input absolute path on server "/srv/www/htdocs/sub.domain.lan" for the project root
But the problem persists. In the debugger section
Remote file path "~/www/htdocs/sub.domain.lan/test/index.php" is not mapped to any file path in project
How can I tell PhpStorm where the files are?
Please sign in to leave a comment.
Please try specifying the actual path instead of symlinked as an Absolute path in mappings setting. Does it work?
Turns out working with multiple projects for a few vhosts resulted in PhpStorm messing up project properties for local servers. Once I corrected the server names and set deployment connections visible only for this project disabling path mappings did the trick.