Reputation: 1596
This is my launch.json
{
"name": "Remote listen for Xdebug",
"type": "php",
"request": "launch",
"port": 26357,
"xdebugSettings": {
"max_children": 128,
"max_data": -1,
"max_depth": 3
},
"pathMappings": {
"/share/ZFS2_DATA/Web/dolibarr-1": "${workspaceRoot}",
"/share/ZFS2_DATA/Web/dolibarr-2": "${workspaceRoot}",
"/share/ZFS2_DATA/Web/dolibarr-3": "${workspaceRoot}",
"/share/ZFS2_DATA/Web/dolibarr-4": "${workspaceRoot}",
},
"log": true,
"proxy": {
"enable": true,
"host": "192.168.1.88",
"port": 26356,
"key": "VSCODE",
"allowMultipleSessions": false
}
},
This is my 99-xdebug.ini
[xDebug]
zend_extension = xdebug
xdebug.mode = debug,develop
xdebug.remote_handler = "dbgp"
xdebug.remote_cookie_expire_time = 36000
xdebug.start_with_request=trigger
;xdebug.discover_client_host=true
;xdebug.client_host = 192.168.1.57
xdebug.client_host = 127.0.0.1
xdebug.client_port = 26357
xdebug.show_exception_trace=false
xdebug.log = /tmp/xdebug.log
xdebug.log_level=10
xdebug.trigger_value=VSCODE
xdebug.idekey=VSCODE
Then I start dbgpProxy with ./dbgpProxy -s 0.0.0.0:26357 -i 0.0.0.0:26356
[david@localhost ~]$ ./dbgpProxy -s 0.0.0.0:26357 -i 0.0.0.0:26356
Xdebug DBGp proxy (0.6.1)
Copyright %s by Derick Rethans 2024
2024-11-11 07:20:38.038 [warn] [SSL] The 'certs/fullchain.pem' file could not be found, not enabling SSL listeners
2024-11-11 07:20:38.039 [info] [dbgpProxy] Proxy started
2024-11-11 07:20:38.039 [info] [server] Started server server on 0.0.0.0:26357
2024-11-11 07:20:38.039 [info] [server] Started client server on 0.0.0.0:26356
2024-11-11 07:20:41.436 [info] [server] Start new client connection from 192.168.1.57:11892
2024-11-11 07:20:41.953 [info] [proxyinit] [VSCODE] Added connection for IDE Key 'VSCODE': 192.168.1.57:26357
2024-11-11 07:20:41.953 [info] [server] Closing client connection from 192.168.1.57:11892
Output on vscode
Registering VSCODE on port 26357 with proxy @ 192.168.1.88:26356
Registration successful
xdebug log
[30035] [Step Debug] <- detach -i 1 -- "dbgpProxy has no IDE connected to it"
[30035] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="1" status="stopping" reason="ok"></response>
[30035] [Step Debug] WARN: Debug client detached: "dbgpProxy has no IDE connected to it".
[30035] Log closed at 2024-11-11 07:34:21.343605
[942] Log opened at 2024-11-11 07:34:25.171655
[942] [Config] DEBUG: Checking if trigger 'XDEBUG_TRIGGER' is enabled for mode 'debug'
[942] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[942] [Config] DEBUG: The trigger value 'VSCODE' matched the shared secret 'VSCODE' for mode 'debug'
[942] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:26357.
[942] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:26357 (through xdebug.client_host/xdebug.client_port). :-)
[942] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///share/ZFS2_DATA/Web/dolibarr-1/htdocs/custom/evterceros/billing/api/firmarFacturas.php" language="PHP" xdebug:language_version="7.4.30" protocol_version="1.0" appid="942" idekey="VSCODE"><engine version="3.1.6"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2022 by Derick Rethans]]></copyright></init>
[942] [Step Debug] <- detach -i 1 -- "dbgpProxy has no IDE connected to it"
[942] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="1" status="stopping" reason="ok"></response>
[942] [Step Debug] WARN: Debug client detached: "dbgpProxy has no IDE connected to it".
[942] Log closed at 2024-11-11 07:34:25.223544
While on dbgpProxy I get
2024-11-11 07:34:00.364 [info] [server] Start new client connection from 192.168.1.57:12102
2024-11-11 07:34:00.869 [info] [proxyinit] [VSCODE] Added connection for IDE Key 'VSCODE': 192.168.1.57:26357
2024-11-11 07:34:00.869 [info] [server] Closing client connection from 192.168.1.57:12102
2024-11-11 07:34:21.342 [err ] [proxy-client] [VSCODE] IDE not connected: dial tcp 192.168.1.57:26357: connect: connection timed out
2024-11-11 07:34:21.342 [warn] [proxy-client] [VSCODE] Removed connection information for 'VSCODE': dial tcp 192.168.1.57:26357: connect: connection timed out
2024-11-11 07:34:21.343 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
2024-11-11 07:34:21.343 [info] [server] Closing server connection from 127.0.0.1:48254
2024-11-11 07:34:25.172 [info] [server] Start new server connection from 127.0.0.1:48350
2024-11-11 07:34:25.172 [info] [proxy-client] [VSCODE] Could not find IDE connection for IDE Key 'VSCODE'
2024-11-11 07:34:25.172 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
2024-11-11 07:34:25.172 [info] [server] Closing server connection from 127.0.0.1:48350
Am I using the wrong ports? Is it firewall related? There's nothing on iptables or my Windows Firewall so if it's firewall related it might be a physical firewall.
With wireshark I see this:
Is that the proxy server trying to connect to my pc?
Upvotes: 0
Views: 58