Breakpoints using REMOTE Server w/ xdebug not working

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

Breakpoints using REMOTE Server w/ xdebug not working

Postby garfly » Thu May 11, 2017 7:48 am

I hit the green debug "Run" triangle, file code runs on remote sever, DOES NOT STOP AT ANY OF MY BREAK POINTS.
The blue "Stop" debug square lights up, the entire script output (just a bunch of echo statements, every other one has a breakpoint) shows up in web browser window (https://subdom.domain.com/myfile.php?XD ... webuilder&), and the step over, step into and step out buttons remain gray. I then have to hit the blue stop button (turns gray) to continue working;

SO - let me describe my setup-
REMOTE SERVER
(I'm mimicking relevant parts of a remote netbeans xdebug config described here:
https://stuporglue.org/setting-up-xdebug-with-netbeans-on-windows-with-a-remote-apache-server/
btw- I've gotten remote netbeans xdebug to work, I just like your IDE better).

PHP.ini:
[xdebug]
zend_extension ="/path/to/xdebug-2.5.3.so"
xdebug.idekey=webuilder
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_server=localhost
xdebug.remote_port=9000
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.remote_mode = req
xdebug.remote_log="xdebug.log"

phpinfo() shows me: Version 2.5.3; IDE Key webuilder; ... (+ ~50 settings) = ALL IS WORKING FINE HERE


DESKTOP CLIENT:
I've set up a ssh tunnel with Putty (port 9000); tested with
netstat -a -n | grep 9000
and I get:
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN
tcp 0 0 ::1:9000 :::* LISTEN
= THIS SHOULD BE WORKING

Rapid PHP 2016 version : 14.3.0.187 - just downloaded and installed today GREAT IDE!

I've mapped my local 'K' drive to my ~home directory on my remote unix server, so
My project root directory: 'K:\public_html\subdom'
My mapping: 'K:\public_html\subdom\' = https://subdom.domain.com/

Debugger settings: session name: webuilder; port 9000
I know it shouldn't matter, but I un checked the 'Use built-in Web Server'
SO - anything else I could/should be doing? (it's gotta be my mappings or my xdebug settings.)

GREAT PRODUCT; Thanks in advance!
garfly
 
Posts: 5
Joined: Thu May 11, 2017 6:02 am

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby Aivars » Thu May 11, 2017 11:05 am

I'll admit that I've never tried to use a remote server (as in server on a different machine that IDE), but if you're doing it, shouldn't this:
xdebug.remote_server=localhost
instead point to your IP address (that the IDE is running on)? And it's important that the server can connect to that IP (no blocking due to routers, firewalls etc).
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1981
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby garfly » Thu May 11, 2017 6:19 pm

Great id - inserting my ip takes the tunnel & and other network stuff out of play;
Unfortunately, it didn't seem to help. Same outcome. Any other ideas?
If not, is this a fair request for a "new feature"?

Thanks for looking at this.
garfly
 
Posts: 5
Joined: Thu May 11, 2017 6:02 am

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby Aivars » Thu May 11, 2017 6:49 pm

I forgot to ask - if you go to menu PHP -> Debug -> Debugger Settings - is Listen to External Sessions checked?

For testing you could try to connect manually from the server to IDE (using telnet or something similar while PHP debugging is active) just to check if the connection as such works.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1981
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby garfly » Thu May 11, 2017 7:46 pm

Good question, and Yep, "Listen to external sessions" is checked.

So - I have connected from client to server (using Putty not telnet), & I've forwarded port 9000 - I think that is what you mean;
Is there a way to test the success of the "server to IDE ... while PHP debugging is active ... just to check if the connection as such works " connection you suggest?

Thanks again - I really think the "debug remote code" is a REALLY cool feature of NetBeans (that i've gotten to work), but my experience with NetBeans is that it's heavy and unstable.
Again - GREAT IDE - the more I'm exploring, the more I like it best among the dozen or so I've evaluated recently.
garfly
 
Posts: 5
Joined: Thu May 11, 2017 6:02 am

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby garfly » Fri May 12, 2017 3:46 am

I'm getting farther (a little); If i set up my tunnel as above, IDE settings as above, and minimal xdebug settings like this:
zend_extension ="/path/to/xdebug-2.5.3.so"
xdebug.remote_log="xdebug.log"
xdebug.idekey=webuilder
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=localhost

xdebug.log gives me:

Log opened at 2017-05-12 01:37:52
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/username/public_html/dev/myfile.php" language="PHP" xdebug:language_version="5.6.29" protocol_version="1.0" appid="22970" idekey="webuilder"><engine version="2.5.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2017 by Derick Rethans]]></copyright></init>

<- feature_set -i 777 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="777" feature="max_depth" success="1"></response>

<- feature_set -i 777 -n multiple_sessions -v 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="777" feature="multiple_sessions" success="1"></response>

<- breakpoint_set -i 0 -t line -n 3 -f file:///K:/public_html/dev/myfile.php
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="0" id="229700001"></response>

<- breakpoint_set -i 1 -t line -n 5 -f file:///K:/public_html/dev/myfile.php
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="1" id="229700002"></response>

... several other breakpoints ...

<- run -i 777
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="777" status="stopping" reason="ok"></response>

<- run -i 777
Log closed at 2017-05-12 01:37:52

SO THE REMOTE SERVER IS USING THE SSH TUNNEL (localhost:9000) BACK TO MY DESKTOP IDE AND FINDING THE BREAKPOINTS :) BUT NOT STOPPING AT ANY OF THE BREAKPOINTS :(
Any more ideas?
Thanks again in advance
garfly
 
Posts: 5
Joined: Thu May 11, 2017 6:02 am

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby Aivars » Fri May 12, 2017 9:13 am

I think I know what the problem must be. The server is reporting a different file name i.e. /home/username/public_html/dev/myfile.php but IDE is using K:/public_html/dev/myfile.php and they both can't understand that it is the same file. So indeed, to make this work, some additional mapping is required. I'll add it to suggestions list.

Thanks for all the debugging and helping me understand the issue.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1981
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Breakpoints using REMOTE Server w/ xdebug not working

Postby garfly » Fri May 12, 2017 7:36 pm

My 2 cents (idea from a guy who has no idea if this would work nor how hard it is to produce and support an IDE):

Options->Preferences->Mappings allows me to map a http:// address to a remote FTP/SFTP folder.

I can take my MAPPED DRIVE (K) drive completely out of play if project properties allowed me to use an FTP/SFTP connection as the root folder for a project. (Would also likely affect 'Excluded Files and Folders', and 'Library Paths' + other things ...).

Even without the debugging benefits, I think defining a project on remote server through SFTP has some great benefits. 2 biggest:
a) I've always had issues with the stability of mapped drives -they drop, freeze ... SFTP doesn't;
b) Your coding against REAL environment that already has all the stuff (DB/Apache/SSL/PHP/Libs ... already set up). = fewer issues/corrections when you publish from local work.

But I have no idea how that would affect everything else inside the IDE.

Thanks again for looking at this... Great IDE and GREAT support.
garfly
 
Posts: 5
Joined: Thu May 11, 2017 6:02 am


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron