I’m attempting to connect to a remote PHP server for debugging. I have followed this video tutorial to do what I need to do, and it works right up until setting the pathMappings. The pathMappings gets set, and simply appends ssh:whatever to the workspace root.
The tutorial uses SSH FS instead of Remote SSH, which I need because the PHP code lives on an OS400 system which isn’t supported by Remote SSH yet.
php.ini xdebug configuration:
zend_extension=xdebug
xdebug.mode=develop,debug
xdebug.discover_client_host=1
xdebug.client_port=9003
xdebug.log=/server/path/logs/xdebug.log
xdebug.log_level=10
SSH FS config:
"name": "remote-ssh-con"
"host": "***"
"root": "/server/path/htdocs",
"username": "***"
"password": true
debug launch.json config:
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"stopOnEntry": true,
"pathMappings": {
"/server/path/htdocs" : "ssh://remote-ssh-con/server/path/htdocs"
}
and the result, when I turn on listening and refresh the page, is it popping up with “The editor could not be opened because the file was not found” error, with a path of C:UsersmeAppDataLocalProgramsMicrosoft VS Codessh:remote-ssh-conserverpathhtdocsindex.php
It’s simply appending the SSH path to a Windows path. What do I need to do differently in order for it to understand to use the SSH path, not a Windows one?