You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Lucio <lu...@sulweb.org> on 2019/01/15 09:05:25 UTC
waiting for connection (xdebug)
I'm trying to use NB to debug PHP application (Wordpress with a WP
plugin I'm writing). I'm on Debian sid with NB10, OpenJDK 11 and PHP 7.3
FPM.
Here is my /etc/php/7.3/mods-available/xdebug.ini
zend_extension = /usr/lib/php/20180731/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_mode = req
xdebug.remote_port = 9999
In NB the PHP Debug tab is configured accordingly.
Here are the steps i take to start the debug session:
# systemctl stop php7.3-fpm
then I click "Debug project" in NB, NB runs Chrome and "Waiting for
Connection (xdebug)" starts spinning.
# systemctl start php7.3-fpm
then I open a new tab in Chrome and load the URL pointing to my local
website.
At this point the Chrome tab keeps spinning, but NB keeps "Waiting For
Connection (xdebug)" and never reaches the first breakpoint I set on the
first code line of index.php. After a while Chrome reports a "504
Gateway Timeout" error signed off by Apache (which is configured as
reverse proxy for PHP-FPM).
The very same configuration and the very same steps do work if I use
Vistual Studio Code for Linux instead of NB, so I assume xdebug is
correctly configured.
However I like NB more than VSC, and I'd prefer having NB working.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: waiting for connection (xdebug)
Posted by Lucio Crusca <lu...@sulweb.org>.
On 10/02/19 17:53, Jake Ochs wrote:
> Haven’t been able to devote the time [...]
Please take a look at my comment in the bugtracker [1] for details. I copy here only the last sentence, for those not subscribed to the bug report:
Do you think it's possible that current NB lacks JAXB dependency, but it uses it only for communicating with xdebug (the DBGp protocol is XML based) and maybe other minor things no one noticed until now?
1. https://issues.apache.org/jira/browse/NETBEANS-1959
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
RE: waiting for connection (xdebug)
Posted by Jake Ochs <gi...@hotmail.com>.
Haven’t been able to devote the time to getting a VirtualBox Linux instance up to mimic your config and verify. I tried, But I ran out of time/patience and my VirtualBox kung-fu isn’t as good as it used to be ☹. In general, I am finding that the sacrifice I make for using NB10 at work now (instead of NB8) is the difficulty I have debugging. It’s tough debugging unit tests and nearly impossible to debug websites. I continue to use it for its superior editing environment, but have switched to Visual Studio Code for debugging websites. VSCode also has conditional breakpoints working – something I was never able to get working well in NB.
________________________________
From: Lucio <lu...@sulweb.org>
Sent: Wednesday, January 16, 2019 2:40:08 AM
To: Jake Ochs; users@netbeans.apache.org
Cc: John Lavelle
Subject: Re: waiting for connection (xdebug)
Il 16/01/19 03:25, Jake Ochs ha scritto:
> Is netbeans php/debug set to break at first statement?
>
Tried both cases, set to break and not set. Niether one works for me.
RE: waiting for connection (xdebug)
Posted by Jake Ochs <gi...@hotmail.com>.
I was going to file a bug report for other issues relating to NB10 XDebug issues. I haven’t tried to replicate your issue, I’l lfire up a VirtualBox Linux session with your environment to try and replicate the issue.
________________________________
From: Lucio <lu...@sulweb.org>
Sent: Sunday, January 20, 2019 6:46:09 AM
To: users@netbeans.apache.org
Subject: Re: waiting for connection (xdebug)
I wrote:
> Do you agree? Or am I overlooking something? Should I file a bug
> report?
I'm not sure about how to read the lack of replies in this case, anyway
here is the bug report with a few more info, just in case anyone wants
to chime in from now on:
https://issues.apache.org/jira/browse/NETBEANS-1959
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: waiting for connection (xdebug)
Posted by Lucio <lu...@sulweb.org>.
I wrote:
> Do you agree? Or am I overlooking something? Should I file a bug
> report?
I'm not sure about how to read the lack of replies in this case, anyway
here is the bug report with a few more info, just in case anyone wants
to chime in from now on:
https://issues.apache.org/jira/browse/NETBEANS-1959
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: waiting for connection (xdebug)
Posted by Lucio <lu...@sulweb.org>.
While investigating the problem, I noticed this NB behavior, that I
think is itself a bug, and, maybe, it's the same bug causing the problem
I'm facing.
I think NB has a bug at DGBP protocol level, and the "Waiting For
Connection (xdebug)" does not reflect the real state of the PHP Debugger.
Consider these steps:
1) I deliberately set a wrong xdebug port into the PHP Debug settings
(say 4444 for example)
2) I debug a PHP project, NB starts waiting for the incoming xdebug
connection
3) I check the socket is actually listening with the following command
in a linux terminal:
# netstat -nltp | grep 4444
And I get:
tcp 0 0 0.0.0.0:4444 0.0.0.0:* LISTEN 24646/java
so it's actually listening.
4) I stop the "Waiting For Connection (xdebug)" spinner in NB and click
Yes in the "Cancel Running Task" confirm dialog. NB shows me the
information dialog telling how I'm supposed to configure xdebug. I close it.
5) I check the socket is not listening anymore:
# netstat -nltp | grep 4444
and it doesn't return anything, so it's not listening.
6) I repeat steps 2-5 as many times as I want, and I always get the same
results. Now I configure NB with the correct DGBP port (9999 in my case).
7) I start debugging the same PHP project again (I've not tried with a
different one).
8) I check the socket is actually listening:
# netstat -nltp | grep 9999
and it is:
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 24646/java
9) I open a new browser tab, pointing to the PHP project URL on
localhost, but debugging does not work in my case, so the browser tab
keeps spinning
10) same as step 4 (I stop the NB waiting spinner), because debugging
does not work in my case, even if I configured the correct port
11) I check the socket is not listening anymore
12) I repeat steps 7 and 8 and I expect to see the socket listening
again, but I actually get nothing from "netstat ... | grep ..." in step
8, so I assume the first time NB was listening to the correct port, it
did actually receive something, but it failed to parse it and that led
NB into a inconsistent state that prevents it from listening again on
the same port.
Do you agree? Or am I overlooking something? Should I file a bug report?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: waiting for connection (xdebug)
Posted by Lucio <lu...@sulweb.org>.
Il 16/01/19 03:25, Jake Ochs ha scritto:
> Is netbeans php/debug set to break at first statement?
>
Tried both cases, set to break and not set. Niether one works for me.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
RE: waiting for connection (xdebug)
Posted by Jake Ochs <gi...@hotmail.com>.
Is netbeans php/debug set to break at first statement?
________________________________
From: Lucio Crusca <lu...@sulweb.org>
Sent: Tuesday, January 15, 2019 1:20:28 PM
To: users@netbeans.apache.org
Cc: John Lavelle
Subject: Re: waiting for connection (xdebug)
On 15/01/19 13:10, John Lavelle wrote:
> In NetBeans you need to have the main PHP file open in the editor and the tab selected then in the CSS window on the right, click on "open in browser"
>
> That works for me.
It does not work for me.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: waiting for connection (xdebug)
Posted by Lucio Crusca <lu...@sulweb.org>.
On 15/01/19 13:10, John Lavelle wrote:
> In NetBeans you need to have the main PHP file open in the editor and the tab selected then in the CSS window on the right, click on "open in browser"
>
> That works for me.
It does not work for me.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: waiting for connection (xdebug)
Posted by John Lavelle <jo...@jql.co.uk>.
In NetBeans you need to have the main PHP file open in the editor and the
tab selected then in the CSS window on the right, click on "open in
browser"
That works for me.
Best regards,
John
On Tue, 15 Jan 2019 at 10:05, Lucio <lu...@sulweb.org> wrote:
> I'm trying to use NB to debug PHP application (Wordpress with a WP
> plugin I'm writing). I'm on Debian sid with NB10, OpenJDK 11 and PHP 7.3
> FPM.
>
> Here is my /etc/php/7.3/mods-available/xdebug.ini
>
> zend_extension = /usr/lib/php/20180731/xdebug.so
> xdebug.remote_autostart = 1
> xdebug.remote_enable = 1
> xdebug.remote_handler = dbgp
> xdebug.remote_host = 127.0.0.1
> xdebug.remote_mode = req
> xdebug.remote_port = 9999
>
> In NB the PHP Debug tab is configured accordingly.
>
> Here are the steps i take to start the debug session:
>
> # systemctl stop php7.3-fpm
>
> then I click "Debug project" in NB, NB runs Chrome and "Waiting for
> Connection (xdebug)" starts spinning.
>
> # systemctl start php7.3-fpm
>
> then I open a new tab in Chrome and load the URL pointing to my local
> website.
>
> At this point the Chrome tab keeps spinning, but NB keeps "Waiting For
> Connection (xdebug)" and never reaches the first breakpoint I set on the
> first code line of index.php. After a while Chrome reports a "504
> Gateway Timeout" error signed off by Apache (which is configured as
> reverse proxy for PHP-FPM).
>
> The very same configuration and the very same steps do work if I use
> Vistual Studio Code for Linux instead of NB, so I assume xdebug is
> correctly configured.
>
> However I like NB more than VSC, and I'd prefer having NB working.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>