WORDPRESS Remote Debugging SSH Tunnel Putty [message #1860669] |
Thu, 24 August 2023 14:25 |
Carlos Sanchez Messages: 7 Registered: February 2012 |
Junior Member |
|
|
I am trying to setup Wordpress Remote Debugging through Eclipse, Xdebug and Putty SSH Tunnel but can not get it to work. I appretiate any help :-)
My objective is to be able to remote debug wordpress site through SSH tunnel ideally using only Eclipse but would be just as happy defining the SSH tunnel through Putty and debugging through Eclipse.
Procedure:
1. Copy remote files to local Eclipse repository and I keep them synchronize through Win-Scp.
2. Define PHP Project in Eclipse (exisitng location)
3. Define PHP Server
Name ServerName
Base URL : Hostname.com
Document root pointed to local files index.php file
Debugger: Xdebug Port: 9003
Path Mapping: nothing defined here
4. Networrk Connections (Preferences Window)
Host: Hostname.com:22123
SSH2:
General Tab: SSH2 Home: pointed to my .ssh local directory
Private Keys: id_dsa,id_rsa,PKey-Eclipse
where PKey-Eclise is the name of the Private Key file defined in SSH2 Home.
5. Debug Configuration
PHP Server: Servername
Debugger: Xdebug Port:9003
SSH Tunnel Debug through SSH tunnel and I specify the user and password
At this point I think it is all setup and I should be able to debug when I run the Debug Configuration but:
a.Test Connection Fails
b.Checking SSH connections at server show no attemp for Eclispe to connect
c. Progress bar says Waiting to Xdebug connection (72%)
If I setup the SSH tunnel through Putty and in the Debug Configuration don't check SSH tunel then:
a. Connection to server is made by Putty
b.Progress bar says Waiting to Xdebug connection (72%)
Don't know what I am doing wrong. In the past I had follow this procedure and had worked (some time ago, not in this setup).
Any help is really appretiated.
Server Swr:
-------------
Ubuntu Server 22.04
Apache Server version: 2.4.52 Server built: 2023-05-03T20:02:51
XDEBUG Version 3.2.1
Wordpress Version 6.3
Client Swr:
------------
Window 11 X64 Version 22H2 Build 22621.2215
Eclipse Version: 2023-06 (4.28.0) Build id: 20230608-1333
Putty Release 0.78 Build platform: 64-bit x86 Windows
XDEBUG Configuration:
_____________________
xdebug.mode = debug
xdebug.client_host = localhost
xdebug.client_port = 9003
xdebug.start_with_request = yes
xdebug.log = /var/log/xdebug.log
xdebug.log_level = 10
xdebug.idekey = ECLIPSE
Putty Configuration:
------------------------
Host: Hostname.com
Port: 22123
SSH-Auth-Credentials; Private key file
SSH-Tunnel : Source 9003 Destination localhost:9003
Eclipse Related Configuration:
Project define at host
Locan files synchronized with remote server
[Updated on: Thu, 24 August 2023 17:52] Report message to a moderator
|
|
|
Re: WORDPRESS Remote Debugging SSH Tunnel Putty [message #1860703 is a reply to message #1860669] |
Sun, 27 August 2023 19:09 |
Carlos Sanchez Messages: 7 Registered: February 2012 |
Junior Member |
|
|
OK, just in case some one is interested:
I was able to get Eclipse to Debug PHP Through XDEBUG 3 by setting the Xdebug configuration as follows:
zend_extension=xdebug.so
xdebug.mode = debug
xdebug.client_host = locaworkStation_Remote IP
xdebug.connect_timeout_ms = 500
xdebug.log = "/tmp/xdebug.log"
And Remote Debugging through SSH Tunnel setting configurations as follows:
XDEBUG Configuration:
/etc/php/8.1/cgi/conf.d/20-xdebug.ini
zend_extension=xdebug.so
xdebug.mode = debug
xdebug.client_host = localhost
xdebug.connect_timeout_ms = 500
xdebug.log = "/tmp/xdebug.log"
Generated RSA Key with Putty Gen
Open a Tunnel to server from Putty:
LOCAL R9003 locallhost:9003
Eclipse Configuration:
1) Setup PHP Server ponted to Host
2) Setup Debug Configuration
Debugger XDEBUG PORT 9003
Debug on SSH Tunnel NOT selected
Procedure:
1)Run SSH Tunnel from Putty
2)Set Breakpoints in PHP file(s)
3)Run debug COnfiguration
Seems to be working fine!
[Updated on: Wed, 30 August 2023 16:42] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03947 seconds