
| View previous topic :: View next topic |
| Author |
Message |
ridiculous
Joined: 30 May 2009 Posts: 3
|
Posted: Sat May 30, 2009 4:21 am Post subject: XDebug WILL NOT CONNECT // COMPREHENSIVE DISCUSSION. [Netbeans 6.5, PHP 5.29, Wampserver 2.0, Xdebug 2.0.4] |
|
|
CONTENTS
------------
[1] FACT PRESENTATION FOR NETBEANS USERS
[2] NOTE TO NETBEANS DEVELOPMENT TEAM
[3] NOTE ON XAMPP VS. WAMPSERVER
FACT PRESENTATION FOR NETBEANS USERS:
-----------------------------------------------------
When I attempt to debug a php project in Netbeans using XDebug, I receive a perpetual Waiting for Connection (netbeans-xdebug) message in the lower status bar area of my Netbeans IDE.
I have taken the following steps to install and configure XDebug to work with Netbeans:
[1] I downloaded php_xdebug-2.0.4-5.2.8.dll.
[2] I copied php_xdebug-2.0.4-5.2.8.dll to the directory C:\wamp\bin\php\php5.2.9-2.
[3] I have changed my php.ini file as follows:
[xdebug]
zend_extension_ts="c:/wamp/bin/php/php5.2.9-2/ext/php_xdebug-2.0.4-5.2.8.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=default
Note** On Wamp 2.0 you do not need to disable the ZEND optimizer because the Zend optimizer does not come installed by default.
[4] I ran phpinfo() and found that XDebug was registered as an active extension.
[5] I ran the test to see if XDebug is correctly installed that is recommended here: http://blogs.sun.com/netbeansphp/entry/howto_check_xdebug_installation
XDebug passes this test. (When I follow these instructions my "dbgtest.php" page returns "connection established: Resource id #3").
**Helpful note to Windows users who opt to use the tutorial referenced above:
You can't run PHP from the command line if you're using Wampserver, that step is designed for Linux system users. However, you can get simply perform the test by running "dbgtest.php" in your browser window and then by running "http://localhost/index.php?XDEBUG_SESSION_START=mysession"
[6] I browsed tools/options/php in my Netbeans IDE to verify that the default port for the debugger matched that of my php.ini file. It did (9000). I also tried (9001) on both to see if there was a conflict. This changes nothing.
[CONCLUSION]
The documentation currently published by Netbeans.org for XDebug installation is INSUFFICIENT. Please fix this.
I have spent two days trying to resolve this issue. I have followed all of the instructions listed. One other forum topic dealt with a person who had trouble installing XDebug on Wamp, but that person did not follow up with their fix...so the thread is of no value to other users.
Thanks.
NOTE TO NETBEANS DEVELOPMENT TEAM:
-------------------------------------------------
On the Netbeans PHP Forum, XDebug installation related topics have about a 70% market share in terms of user views.
This is a red flag. Netbean's current documentation on XDebug installation AND/OR the XDebug installation process itself needs improvement. The project manager needs to make this issue a priority.
In my case, 2 days have been spent looking through links written mostly in spotty English, centered on linux platforms, or which assume the user is utilizing the Netbeans/XAMPP stack. I have followed said instructions and outlined my actions as meticulously as possible below. Despite this, I receive nothing but a "Waiting for Connection" message in the status bar of the NetBeans IDE.
This forum post was a last resort.
NOTE ON XAMPP
-------------------
Many users may find that XAMPP lacks many ease-of-use features that Wampserver includes. I am not an employee or agent for Wampserver, but I would like you to know that Wampserver is a far superior product in that it allows you to quickly manage many apache, mySQL, and PHP configuration options via a drag and drop GUI that is embedded into the Windows system tray. XAMPP lacks this and consequently takes far more of your time to manage.
| Description: |
|
 Download |
| Filename: |
php.ini.txt |
| Filesize: |
49.14 KB |
| Downloaded: |
81 Time(s) |
Last edited by ridiculous on Sat May 30, 2009 4:42 am; edited 2 times in total |
|
| Back to top |
|
 |
ridiculous
Joined: 30 May 2009 Posts: 3
|
Posted: Sat May 30, 2009 4:35 am Post subject: |
|
|
-I also tried the steps listed for XDebug WAMP installation that are given here:
http://wiki.netbeans.org/HowToConfigureXDebug
-The following command : netstat -ano |find /i "listening"
did not return any port conflicts.
|
|
| Back to top |
|
 |
ridiculous
Joined: 30 May 2009 Posts: 3
|
Posted: Sat May 30, 2009 7:06 am Post subject: I solved this problem. |
|
|
SOLVED.
Hopefully this will serve as a documentation piece to others who shared the same experience as I.
-----------------------------------------------
[1] YOU MUST SETUP THE DEFAULT PHP INTERPRETER
sepehrmm wrote:
wow,
I finally found a workaround for debugging problem that is working for me :
first read my previous post ( some post above)
*
*
*
*
explanation :
if in debug proccess NB have opened the browser then it fails to debug the code some more times so we must DISABLE and PREVENT NB to open the browser by itself in following steps:
on PROJECTS WINDOW right click on project node that you are working on and select properties, in PROJECTS PROPERTIES WINDOW
select Run Configuration on the left panel and change RUN AS option from LOCAL WEB SITE to SCRIPT then set the PHP Interpreter to
php-win.exe path (in the php installation folder,usually :"C:\Program Files\PHP\php-win.exe") and unmark Use Default PHP Interpreter
or
you can mark Use Default PHP Interpreter and then click Configure button and set PHP 5 Interpreter just like above (php-win.exe path of course ).
important:
it's better to not choose any option in TOOLS->OPTIONS->PHP->Open Result In
and instead of running or opening browser from within NB open the page you are working on in your favorite browser by yourself,
p.s:
please test and tell me the result,TNX
[2] You cannot run the php debugger on a netbeans project unless an index file is specified and that index file is a php file.
Tristan 559:
Hello,
I was able to narrow down the problem for the issue I found yesterday.
My project's main index.htm file did not have any PHP code in it. When I would go to debug the project, NetBeans would never connect to Xdebug, even when I went further into my project that ran PHP files.
If I simply add <?php and ?> to my project's main index.htm file, NetBeans will connect to Xdebug if I debug the project. It will still only connect after I navigate away from my main index.htm file and into my project's PHP files (via links in my index.htm page).
Does anyone know if this is correct functionality? I wonder if a lot of people who are saying Netbeans won't connect to XDebug have a project index file that has no PHP code in it. That would cause the issue.
Also, is there somewhere else I should be reporting these findings?
Tristan559 wrote:
Hello,
today was my first day playing around with NetBeans. I also was running into the problem where I knew I have Xdebug installed correctly (it shows up in phpinfo() as well as runs just fine in phpDesigner with the Firefox plug-in) yet Netbeans would just sit there at "Waiting for connection (Netbeans-Xdebug)"
When I would finally hit "STOP" it would say that Netbeans still hadn't heard from Xdebug.
I was always trying to debug the project, not a specific file. I could run the project just fine, bringing up the index page I had specified in the project settings, but debugging the project would always fail to connect to Xdebug.
So after playing around for a few hours, I finally tried to debug a specific php file in my project. Low and behold Netbeans connected to Xdebug just fine and it even stopped at my breakpoint! Success!
But this leads me to the obvious question - why can I debug a specific php file within the project, but not just the project itself? Is there something I am missing to set up properly? Again, remember, I can run the project just fine, with it bringing up the main index page I put in the project settings.
As far as Xdebug crashing apache in Vista - this is a known issue. The Xdebug camp is aware of this problem, but there seems to be no immediate rush to try to resolve it. Some people have gotten around it by having apache use PHP-CGI.exe instead of loading the PHP .dll as a module, but performance slows down to the point where it breaks Ajax functionality - at least it did for me.
Anyways, if I can get to where I can debug my actual project instead of just a single file within that project, I will be home free.
Any suggestions would be greatly appreciated.
|
|
| Back to top |
|
 |
Filip Zamboj Posted via mailing list.
|
Posted: Mon Jun 01, 2009 9:12 am Post subject: XDebug WILL NOT CONNECT // COMPREHENSIVE DISCUSSION. [Netbeans 6.5, PHP 5.29, Wampserver 2.0, Xdebug 2.0.4] |
|
|
Hi,
thanks a lot for feedback on manual. I'll go through your notes and will
see what I can do about that. I'll keep you updated.
Thanks.
Regards,
-------------
Filip Zamboj
Sun Microsystems
http://www.netbeans.org/community/issues.html
http://qa.netbeans.org
ridiculous wrote:
| Quote: | SOLVED.
Hopefully this will serve as a documentation piece to others who shared the same experience as I.
-----------------------------------------------
[1] YOU MUST SETUP THE DEFAULT PHP INTERPRETER
sepehrmm wrote:
wow,
I finally found a workaround for debugging problem that is working for me :
first read my previous post ( some post above)
*
*
*
*
explanation :
if in debug proccess NB have opened the browser then it fails to debug the code some more times so we must DISABLE and PREVENT NB to open the browser by itself in following steps:
on PROJECTS WINDOW right click on project node that you are working on and select properties, in PROJECTS PROPERTIES WINDOW
select Run Configuration on the left panel and change RUN AS option from LOCAL WEB SITE to SCRIPT then set the PHP Interpreter to
php-win.exe path (in the php installation folder,usually :"C:\Program Files\PHP\php-win.exe") and unmark Use Default PHP Interpreter
or
you can mark Use Default PHP Interpreter and then click Configure button and set PHP 5 Interpreter just like above (php-win.exe path of course ).
important:
it's better to not choose any option in TOOLS->OPTIONS->PHP->Open Result In
and instead of running or opening browser from within NB open the page you are working on in your favorite browser by yourself,
p.s:
please test and tell me the result,TNX
[2] You cannot run the php debugger on a netbeans project unless an index file is specified and that index file is a php file.
Tristan 559:
Hello,
I was able to narrow down the problem for the issue I found yesterday.
My project's main index.htm file did not have any PHP code in it. When I would go to debug the project, NetBeans would never connect to Xdebug, even when I went further into my project that ran PHP files.
If I simply add <?php and ?> to my project's main index.htm file, NetBeans will connect to Xdebug if I debug the project. It will still only connect after I navigate away from my main index.htm file and into my project's PHP files (via links in my index.htm page).
Does anyone know if this is correct functionality? I wonder if a lot of people who are saying Netbeans won't connect to XDebug have a project index file that has no PHP code in it. That would cause the issue.
Also, is there somewhere else I should be reporting these findings?
Tristan559 wrote:
Hello,
today was my first day playing around with NetBeans. I also was running into the problem where I knew I have Xdebug installed correctly (it shows up in phpinfo() as well as runs just fine in phpDesigner with the Firefox plug-in) yet Netbeans would just sit there at "Waiting for connection (Netbeans-Xdebug)"
When I would finally hit "STOP" it would say that Netbeans still hadn't heard from Xdebug.
I was always trying to debug the project, not a specific file. I could run the project just fine, bringing up the index page I had specified in the project settings, but debugging the project would always fail to connect to Xdebug.
So after playing around for a few hours, I finally tried to debug a specific php file in my project. Low and behold Netbeans connected to Xdebug just fine and it even stopped at my breakpoint! Success!
But this leads me to the obvious question - why can I debug a specific php file within the project, but not just the project itself? Is there something I am missing to set up properly? Again, remember, I can run the project just fine, with it bringing up the main index page I put in the project settings.
As far as Xdebug crashing apache in Vista - this is a known issue. The Xdebug camp is aware of this problem, but there seems to be no immediate rush to try to resolve it. Some people have gotten around it by having apache use PHP-CGI.exe instead of loading the PHP .dll as a module, but performance slows down to the point where it breaks Ajax functionality - at least it did for me.
Anyways, if I can get to where I can debug my actual project instead of just a single file within that project, I will be home free.
Any suggestions would be greatly appreciated.
|
|
|
| Back to top |
|
 |
Filip Zamboj Posted via mailing list.
|
Posted: Tue Jun 02, 2009 4:20 pm Post subject: XDebug WILL NOT CONNECT // COMPREHENSIVE DISCUSSION. [Netbeans 6.5, PHP 5.29, Wampserver 2.0, Xdebug 2.0.4] |
|
|
Hi.
First of all, thanks for your contribution.
See my comments inline, take this as a discussion so if you don't agree
then don't hesitate to write me back . I added some points to manual.
-------------
Filip Zamboj
Sun Microsystems
http://www.netbeans.org/community/issues.html
http://qa.netbeans.org
ridiculous wrote:
| Quote: | CONTENTS
------------
[1] FACT PRESENTATION FOR NETBEANS USERS
[2] NOTE TO NETBEANS DEVELOPMENT TEAM
[3] NOTE ON XAMPP VS. WAMPSERVER
FACT PRESENTATION FOR NETBEANS USERS:
-----------------------------------------------------
When I attempt to debug a php project in Netbeans using XDebug, I receive a perpetual Waiting for Connection (netbeans-xdebug) message in the lower status bar area of my Netbeans IDE.
I have taken the following steps to install and configure XDebug to work with Netbeans:
[1] I downloaded php_xdebug-2.0.4-5.2.8.dll.
[2] I copied php_xdebug-2.0.4-5.2.8.dll to the directory C:\wamp\bin\php\php5.2.9-2.
[3] I have changed my php.ini file as follows:
[xdebug]
zend_extension_ts="c:/wamp/bin/php/php5.2.9-2/ext/php_xdebug-2.0.4-5.2.8.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=default
Note** On Wamp 2.0 you do not need to disable the ZEND optimizer because the Zend optimizer does not come installed by default.
| well, if you don't have what to disable than you just don't disable
that. IMHO, it's good it's mentioned where it is. What if somebody is
using wamp and installed zend extensions?
| Quote: |
[4] I ran phpinfo() and found that XDebug was registered as an active extension.
[5] I ran the test to see if XDebug is correctly installed that is recommended here: http://blogs.sun.com/netbeansphp/entry/howto_check_xdebug_installation
XDebug passes this test. (When I follow these instructions my "dbgtest.php" page returns "connection established: Resource id #3").
**Helpful note to Windows users who opt to use the tutorial referenced above:
You can't run PHP from the command line if you're using Wampserver, that step is designed for Linux system users. However, you can get simply perform the test by running "dbgtest.php" in your browser window and then by running "http://localhost/index.php?XDEBUG_SESSION_START=mysession"
| Well, this is true. You can't run php from command line if you are using
wamp unless you have it on path. You're right that it works if you run
it in browser with GET variables as you described. or you go to php
directory and run something like c:\wamp\bin\php\PHP52~1.9-2>php.exe
"c:/wamp/www/dbgtest/dbgtest.php?XDEBUG_SESSION_START=mysession". Added
to manual.
| Quote: |
[6] I browsed tools/options/php in my Netbeans IDE to verify that the default port for the debugger matched that of my php.ini file. It did (9000). I also tried (9001) on both to see if there was a conflict. This changes nothing.
[CONCLUSION]
The documentation the is currently published for XDebug installation on PHP is INSUFFICIENT. Please fix this.
I have spent two days trying to resolve this issue. I have followed all of the instructions listed. One other forum topic dealt with a person who had trouble installing XDebug on Wamp, but that person did not follow up with their fix...so the thread is of no value to other users.
Thanks.
NOTE TO NETBEANS DEVELOPMENT TEAM:
-------------------------------------------------
On the Netbeans PHP Forum, XDebug installation related topics have about a 70% market share in terms of user views.
This is a red flag. Netbean's current documentation on XDebug installation AND/OR the XDebug installation process itself needs improvement. The project manager needs to make this issue a priority.
| I don't really think it's so much insufficient. I followed manual today,
installed fresh wamp on Vista and then configured xdebug without any
problem. It worked on first time.
| Quote: |
In my case, 2 days have been spent looking through links written mostly in spotty English, centered on linux platforms, or which assume the user is utilizing the Netbeans/XAMPP stack. I have followed said instructions and outlined my actions as meticulously as possible below. Despite this, I receive nothing but a "Waiting for Connection" message in the status bar of the NetBeans IDE.
This forum post was a last resort.
NOTE ON XAMPP
-------------------
Many users may find that XAMPP lacks many ease-of-use features that Wampserver includes. I am not an employee or agent for Wampserver, but I would like you to know that Wampserver is a far superior product in that it allows you to quickly manage many apache, mySQL, and PHP configuration options via a drag and drop GUI that is embedded into the Windows system tray. XAMPP lacks this and consequently takes far more of your time to manage.
|
|
|
| Back to top |
|
 |
Tomas Mysik Posted via mailing list.
|
Posted: Wed Jun 03, 2009 8:53 am Post subject: XDebug WILL NOT CONNECT // COMPREHENSIVE DISCUSSION. [Netbeans 6.5, PHP 5.29, Wampserver 2.0, Xdebug 2.0.4] |
|
|
| Dne
|
|
| Back to top |
|
 |
Tomas Mysik Posted via mailing list.
|
Posted: Wed Jun 03, 2009 8:56 am Post subject: XDebug WILL NOT CONNECT // COMPREHENSIVE DISCUSSION. [Netbeans 6.5, PHP 5.29, Wampserver 2.0, Xdebug 2.0.4] |
|
|
Please, ignore my previous email - incorrect email address :)
Thanks,
Tomas
Dne st
|
|
| Back to top |
|
 |
Filip Zamboj Posted via mailing list.
|
Posted: Wed Jun 03, 2009 10:02 am Post subject: XDebug WILL NOT CONNECT // COMPREHENSIVE DISCUSSION. [Netbeans 6.5, PHP 5.29, Wampserver 2.0, Xdebug 2.0.4] |
|
|
Ouch! Thanks Tomas . I'm sorry, I was probably somewhere else in my
mind when I wrote this:
c:\wamp\bin\php\PHP52~1.9-2>php.exe
"c:/wamp/www/dbgtest/dbgtest.php?XDEBUG_SESSION_START=mysession
This obviously won't work! Forget it.
F.
Filip Zamboj wrote:
| Quote: | Hi.
First of all, thanks for your contribution.
See my comments inline, take this as a discussion so if you don't
agree then don't hesitate to write me back . I added some points to
manual.
-------------
Filip Zamboj
Sun Microsystems
http://www.netbeans.org/community/issues.html
http://qa.netbeans.org
ridiculous wrote:
| Quote: | CONTENTS
------------
[1] FACT PRESENTATION FOR NETBEANS USERS
[2] NOTE TO NETBEANS DEVELOPMENT TEAM
[3] NOTE ON XAMPP VS. WAMPSERVER
FACT PRESENTATION FOR NETBEANS USERS:
-----------------------------------------------------
When I attempt to debug a php project in Netbeans using XDebug, I
receive a perpetual Waiting for Connection (netbeans-xdebug) message
in the lower status bar area of my Netbeans IDE.
I have taken the following steps to install and configure XDebug to
work with Netbeans:
[1] I downloaded php_xdebug-2.0.4-5.2.8.dll.
[2] I copied php_xdebug-2.0.4-5.2.8.dll to the directory
C:\wamp\bin\php\php5.2.9-2.
[3] I have changed my php.ini file as follows:
[xdebug]
zend_extension_ts="c:/wamp/bin/php/php5.2.9-2/ext/php_xdebug-2.0.4-5.2.8.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=default
Note** On Wamp 2.0 you do not need to disable the ZEND optimizer
because the Zend optimizer does not come installed by default.
| well, if you don't have what to disable than you just don't disable
that. IMHO, it's good it's mentioned where it is. What if somebody is
using wamp and installed zend extensions?
| Quote: |
[4] I ran phpinfo() and found that XDebug was registered as an active
extension.
[5] I ran the test to see if XDebug is correctly installed that is
recommended here:
http://blogs.sun.com/netbeansphp/entry/howto_check_xdebug_installation
XDebug passes this test. (When I follow these instructions my
"dbgtest.php" page returns "connection established: Resource id #3").
**Helpful note to Windows users who opt to use the tutorial
referenced above:
You can't run PHP from the command line if you're using Wampserver,
that step is designed for Linux system users. However, you can get
simply perform the test by running "dbgtest.php" in your browser
window and then by running
"http://localhost/index.php?XDEBUG_SESSION_START=mysession"
| Well, this is true. You can't run php from command line if you are
using wamp unless you have it on path. You're right that it works if
you run it in browser with GET variables as you described. or you go
to php directory and run something like
c:\wamp\bin\php\PHP52~1.9-2>php.exe
"c:/wamp/www/dbgtest/dbgtest.php?XDEBUG_SESSION_START=mysession".
Added to manual.
|
| Quote: | | Quote: |
[6] I browsed tools/options/php in my Netbeans IDE to verify that the
default port for the debugger matched that of my php.ini file. It did
(9000). I also tried (9001) on both to see if there was a conflict.
This changes nothing.
[CONCLUSION]
The documentation the is currently published for XDebug installation
on PHP is INSUFFICIENT. Please fix this.
I have spent two days trying to resolve this issue. I have followed
all of the instructions listed. One other forum topic dealt with a
person who had trouble installing XDebug on Wamp, but that person did
not follow up with their fix...so the thread is of no value to other
users.
Thanks.
NOTE TO NETBEANS DEVELOPMENT TEAM:
-------------------------------------------------
On the Netbeans PHP Forum, XDebug installation related topics have
about a 70% market share in terms of user views.
This is a red flag. Netbean's current documentation on XDebug
installation AND/OR the XDebug installation process itself needs
improvement. The project manager needs to make this issue a priority.
| I don't really think it's so much insufficient. I followed manual
today, installed fresh wamp on Vista and then configured xdebug
without any problem. It worked on first time.
| Quote: |
In my case, 2 days have been spent looking through links written
mostly in spotty English, centered on linux platforms, or which
assume the user is utilizing the Netbeans/XAMPP stack. I have
followed said instructions and outlined my actions as meticulously as
possible below. Despite this, I receive nothing but a "Waiting for
Connection" message in the status bar of the NetBeans IDE.
This forum post was a last resort.
NOTE ON XAMPP
-------------------
Many users may find that XAMPP lacks many ease-of-use features that
Wampserver includes. I am not an employee or agent for Wampserver,
but I would like you to know that Wampserver is a far superior
product in that it allows you to quickly manage many apache, mySQL,
and PHP configuration options via a drag and drop GUI that is
embedded into the Windows system tray. XAMPP lacks this and
consequently takes far more of your time to manage.
|
|
|
|
| Back to top |
|
 |
dwmaker
Joined: 09 Aug 2009 Posts: 1
|
Posted: Sun Aug 09, 2009 3:29 am Post subject: |
|
|
Hi. thanks ridiculous. This (Solution 1) works for me:
#############################################
SOLVED.
Hopefully this will serve as a documentation piece to others who shared the same experience as I.
-----------------------------------------------
[1] YOU MUST SETUP THE DEFAULT PHP INTERPRETER
sepehrmm wrote:
wow,
I finally found a workaround for debugging problem that is working for me :
first read my previous post ( some post above)
*
#############################################
Port 9000 may be a problem when it is used by another program. This can be test by the following steps:
1. Open Windows Command line, type:
| Code: | | netstat -aon|findstr "9000" |
then you probably get a message:
| Code: | | TCP 127.0.0.1:9000 0.0.0.0:0 LISTENING 3519 |
which means port 9000 is used by process PID 3519. Next:
2. Type the command:
| Code: | | tasklist|findstr "3519" |
you will see:
| Code: | | tor.exe 3519Console 0 16,064 K |
which means tor.exe is using port 9000.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|