CodeLobster IDE
http://codelobster.com/forum/

Remote Debug: Windows Desktop to linux/unix xdebug host
http://codelobster.com/forum/viewtopic.php?f=8&t=24358
Page 1 of 1

Author:  garfly [ Thu Sep 06, 2018 5:17 pm ]
Post subject:  Remote Debug: Windows Desktop to linux/unix xdebug host

Can you help me with specific instructions about how to configure my Windows desktop Codelobster IDE to debug php remotely for code sitting on my hosted unix server.

Some tricks I already know I need to employ:

MAPPED DRIVE: I use ExpanDriive to map my remote server through WebDav to a letter drive. (SFTP drive mapping didn't show or follow symbolic unix lyncs for me. Expandrive is ~$45, I'm sure there are 'free' ways to map to a letter drive, but I use ExpanDrive for several other things as well)

SSH PORT FORWARDING: I use PuTTy and the instructions here to listen locally on port 9000 between my local desktop to my xdebug server.
https://derickrethans.nl/debugging-with-xdebug-and-firewalls.html

But I keep getting the message: "Web Server Not Found"

MyDebug Settings:
Virtual Folder: K:/public_html/subdom
Start Url: http://subdom.mydomain.com
Port 9000
IDE: CodeLobster
xDebug auto start (not checked, because it's running on the remote server - I THINK)

Any xdebug settings that I should have set?
Thanks in advance

Author:  Admin [ Fri Sep 07, 2018 1:19 pm ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

Hi.

Please, add the following lines into your php.ini file (into [xdebug] block after zend_extension = ...)

Code:
xdebug.remote_enable=on
xdebug.remote_host="host where the debug client is running"


If You don't have dedicated IP than add also:
Code:
xdebug.remote_connect_back=on


And add:
Code:
xdebug.remote_log="/temp folder/xdebug.log"

And send us this .log file if the Debugger doesn't work still

After that, please, restart your web server.

If everything is OK that You will see the following line in phpinfo(); output:

Code:
xdebug.remote_enable    On
xdebug.remote_host or xdebug.remote_connect_back On


Regards,
Codelobster Team.

Author:  garfly [ Fri Sep 07, 2018 11:04 pm ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

THANK YOU - so much for the detailed information.

I will try and get back to you....
THANK YOU!!!

Author:  garfly [ Sat Sep 08, 2018 6:13 am ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

Setting, from php.ini:
xdebug.remote_enable = On
xdebug.remote_connect_back = On
xdebug.idekey = "codelobster"
xdebug.remote_log= "xdebug.log"
xdebug.remote_port = 9001

Confirmed in phpinfo:
xdebug.idekey codelobster
xdebug.remote_addr_header no value
xdebug.remote_autostart Off
xdebug.remote_connect_back On
xdebug.remote_cookie_expire_time 3600
xdebug.remote_enable On
xdebug.remote_handler dbgp
xdebug.remote_host localhost
xdebug.remote_log xdebug.log
xdebug.remote_mode req
xdebug.remote_port 9001
xdebug.remote_timeout 200

IN CODE LOBSTER -> Debugger->Settings:
Virtual Folder: LetterMappedDrive:/public_html
Start URL: http://www.mydomain.com
Port: 9001
IDE Key: codelobster
xDebug auto start: checked

If I push the 'check xdebug settings', I get "Web server not found"

The results after pressing the debug button from inside code lobster (xdebug.log):

Log opened at 2018-09-08 05:55:11
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 73.239.58.5:9001.
E: Time-out connecting to client (Waited: 200 ms). :-(
Log closed at 2018-09-08 05:55:12

Anything I am doing wrong?

THANKS FOR YOUR HELP!

Author:  garfly [ Sat Sep 08, 2018 2:45 pm ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

I've got debug working now....

I will provide a write up as soon as I am done testing.

The magic for me seemed to be:
xdebug.remote_autostart = On
xdebug.remote_connect_back = Off

Like I say - let me test some more and I will provide a write up...

Author:  Admin [ Mon Sep 10, 2018 8:26 am ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

Hi.

Here is our working php.ini lines on server side:

Code:
[XDebug]
zend_extension = "/usr/lib/php5/20100525+lfs/xdebug.so"; <==your path here
xdebug.remote_enable=on
xdebug.remote_host="127.0.0.1"; <==127.0.0.1 exactly, "localhost" may not work here
xdebug.default_enable=on
xdebug.max_nesting_level=256
xdebug.remote_log="/tmp/xdebug/xdebug.log"


Don't forget to restart web server after applying changes.
("check xDebug settinngs" mau not work with this configuration)

We set port forwarding by the following command:

Code:
ssh -R 9000:127.0.0.1:9000 username@ip_address; <== your username and server here, enter password after that


And double check Debugger->Virtual_folder settings.

Regards,
Codelobster Team.

Author:  Guest [ Mon Dec 23, 2019 9:55 am ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

Admin Wrote:
...
We set port forwarding by the following command:

Code:
ssh -R 9000:127.0.0.1:9000 username@ip_address; <== your username and server here, enter password after that


...


Do you run the ssh command on the Windows machine ? That does not seem to work for me, that opens a terminal session.

Author:  ComputingFroggy [ Fri Jan 03, 2020 7:27 pm ]
Post subject:  Re: Remote Debug: Windows Desktop to linux/unix xdebug host

Hi,

I think my problem running the debugger on remote comes from the value of Virtual folder in CL Preferences => Debuggers => PHP.

I am trying to debug, on the server, the file :
/mnt/data/webservice/WSFS/v579/server/serverT.php
and on the Windows machine, the same file is at:
C:\Dev_APPS\WorkspaceJAVA\WebServiceFS\branches\SAN\server\serverT.php

What should be the value of Virtual folder in CodeLobster ?
If needed, I could copy the entire code source in a brand new directory, just to make the debugger working.


Thanks in advance,
L@u

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/