Then list the port number, which is usually defaulted to 9000 for xdebug. In the IP Address section, just list 127.0.0.1 or leave it at 0.0.0.0. This is a great free java program to start a TCP server: Also if you are on Windows, Microsoft Message Analyzer can also monitor TCP.īut, if all you are trying to do is remove your IDE is a possible cause of remote debugging problems, I suggest instead you start a local TCP server. Wireshark will allow you to see TCP traffic. If you need to debug, and see if the server is making a call to your IDE there are a few ways you can go about checking. This means tools like Fiddler will not show any packets or information on debugging. Xdebug uses plain old TCP to make connections. If remote_connect_back is enabled, it will try and pull your IP address from the incoming connection and ignore the remote_host and port setting. Or you can ommit it entirely, like this: xdebug.remote_connect_back=1 If you do this, I also caution you make sure remote_connect_back is disabled. This is what you want to do: xdebug.remote_host= This doesn't work: xdebug.remote_host=:9000 I also want to mention that if you have a port number, don't add it. If you want to debug using a url, you can do this by just putting the url after the equals like this: xdebug.remote_host= ![]() This is incorrect, urls in quotes will not work. It makes people think that if you want to use a hostname or URL you need to put it in quotes. Most people don't have issues when using IP addresses in quotes, but this sets a bad precedent. ![]() It may work in some cases, but the quotes can also cause issues. I want to mention something here about xdebug.remote_host xdebug.remote_host="127.0.0.1" Set a breakpoint on first line of index.php and debug.Īdditional settings were suggested on various different posts but above mentioned steps worked perfectly for me. Open Netbeans select New project -> PHP -> PHP project from existing source and select the folder you just copied in htdocs folder. That means your index.php should be at C:/XAMPP/htdocs/(your_website)/index.php Remove semicolons in front of both lines and make remote_enable = 1 xdebug.remote_enable = 1Ĭopy your website code under C:/XAMPP/htdocs/(your_website)/ Remove the semicolon and replace the path with the path of dll you just copied like: zend_extension = "C:\xampp\php\ext\php_xdebug-2.3." zend_extension = "C:\xampp\php\ext\php_xdebug.dll" Goto XAMPP control panel, click on Config button in front of Apache and select php.in, It will diplay you the Xdebug file suitable for your configuration.ĭownload the given Xdebug dll and copy it in C:\xampp\php\ext (Xampp being the default Xampp installation directory) Go to: and paste all the content in TextBox and click Analyze my phpinfo output. Open phpinfo() link on the left pane and copy all the contents on page. Open localhost in browser in should display XAMPP home page. If port 80 is free no problem should arise. Open XAMPP control panel and start Apache. default, Running on other port might need additional configuration settings) It is running on port 80 by default.(I am running XAMPP on port 80 i.e. This might not be the solution for everyone but it worked for me and I hope it helps someone. I uninstalled every previous installations of XAMPP and NetBeans and proceeded with fresh installations. After the Struggle for 5-6 days I will list the steps which worked for me. Recently I was trying to host an open source PHP application on my machine(Windows). Source: Netbeans "Waiting For Connection (netbeans-xdebug)" Issue Though from what I've gathered, the majority of these "Waiting For Connection (netbeans-xdebug)" issues on Windows (with XAMPP, Wamp-Server, etc) are usually a result of Windows Firewall and McAfee (or other firewall and anti-virus software) blocking the connection. The downside here is that all requests will initiate debug data collection and reporting back (making everything slower, and generating more data). will also start the debugging process for all requests, and not just for the ones with the proper session start query or cookie. The downside here is that any source can connect. ![]() This way you don't have to specify the exact IP (i.e., as in the above answer the LAN IP: 192.168.1.5). If for whatever reason XDebug is not able to report back to 127.0.0.1, or Netbeans is not listening on 127.0.0.1, you can configure XDebug to send the data back to the $_SERVER of the original request. If Netbeans and the Web Server are on the same system, ideally XDebug would be configured to send the data back to 127.0.0.1:9000, on which NetBeans would be listening on (and only per session). When Netbeans starts a Debugging session, it starts two Listeners, one on 0.0.0.0:9000 (all IPv4 IPs the system has), and the other on the IPv6 interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |