CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, Fhalcon, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Tue Sep 25, 2018 3:29 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Remote Debug: Windows Desktop to linux/unix xdebug host
PostPosted: Thu Sep 06, 2018 5:17 pm 
Offline

Joined: Sat Apr 02, 2011 5:05 pm
Posts: 6
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Remote Debug: Windows Desktop to linux/unix xdebug host
PostPosted: Fri Sep 07, 2018 1:19 pm 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3228
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Remote Debug: Windows Desktop to linux/unix xdebug host
PostPosted: Fri Sep 07, 2018 11:04 pm 
Offline

Joined: Sat Apr 02, 2011 5:05 pm
Posts: 6
THANK YOU - so much for the detailed information.

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Remote Debug: Windows Desktop to linux/unix xdebug host
PostPosted: Sat Sep 08, 2018 6:13 am 
Offline

Joined: Sat Apr 02, 2011 5:05 pm
Posts: 6
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Remote Debug: Windows Desktop to linux/unix xdebug host
PostPosted: Sat Sep 08, 2018 2:45 pm 
Offline

Joined: Sat Apr 02, 2011 5:05 pm
Posts: 6
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Remote Debug: Windows Desktop to linux/unix xdebug host
PostPosted: Mon Sep 10, 2018 8:26 am 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3228
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2016 phpBB Group