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:\Users\me\AppData\Local\Programs\Microsoft VS Code\ssh:\remote-ssh-con\server\path\htdocs\index.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?
Requested xdebug.log:
[90200] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///server/path/htdocs/index.php" language="PHP" xdebug:language_version="8.1.27" protocol_version="1.0" appid="90200" idekey="mykey"><engine version="3.3.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2023 by Derick Rethans]]></copyright></init>
[90200] [Step Debug] <- breakpoint_list -i 1
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>
[90200] [Step Debug] <- breakpoint_list -i 2
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="2"></response>
[90200] [Step Debug] <- breakpoint_list -i 3
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"></response>
[90200] [Step Debug] <- breakpoint_set -i 4 -t line -f file:///server/path/htdocs/index.php -n 4
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" id="902000010"></response>
[90200] [Step Debug] <- breakpoint_set -i 5 -t exception -x Error
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="902000011"></response>
[90200] [Step Debug] <- breakpoint_set -i 6 -t exception -x Exception
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="902000012"></response>
[90200] [Step Debug] <- step_into -i 7
[90200] [Step Debug] DEBUG: Setting 'has_line_breakpoints on {main} (/server/path/htdocs/index.php:0)
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="7" status="break" reason="ok"><xdebug:message filename="file:///server/path/htdocs/index.php" lineno="4"></xdebug:message></response>
[90200] [Step Debug] <- stack_get -i 8
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="8"><stack where="{main}" level="0" type="file" filename="file:///server/path/htdocs/index.php" lineno="4"></stack></response>
[90200] [Step Debug] <- context_names -i 9 -d 0
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="9"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>
[90200] [Step Debug] <- context_get -i 10 -d 0 -c 0
[90200] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="10" context="0"><property name="$FWREQ" fullname="$FWREQ" type="uninitialized"></property><property name="$action" fullname="$action" type="uninitialized"></property><property name="$actionfile" fullname="$actionfile" type="uninitialized"></property><property name="$conn" fullname="$conn" type="uninitialized"></property><property name="$fwURL" fullname="$fwURL" type="uninitialized"></property><property name="$msg" fullname="$msg" type="uninitialized"></property><property name="$outputFormat" fullname="$outputFormat" type="uninitialized"></property><property name="$sessionOK" fullname="$sessionOK" type="uninitialized"></property><property name="$subaction" fullname="$subaction" type="uninitialized"></property><property name="$user" fullname="$user" type="uninitialized"></property></response>