Xdebug and Netbeans do not communicate with each other

I spent a couple of days on the Internet to find the answer to my question. I tried everything I could, but still have not been able to solve this problem. Netbeans continues to provide Connection Waiting (netbeans-xdebug) .

I am using the following software:

  • XAMPP Version 1.8.1.
  • Windows 7
  • Netbeans IDE 7.2.1
  • Xdebug 2.2.1

I installed the latest version according to the wizard for xdebug.org (http://xdebug.org/wizard.php). Xdebug works according to phpinfo (). The HMTL output in my browser (Firefox 17.0.1) shows the xdebug code. However, this is not passed back to netbeans. Using Netstat using the command line (Run → cmd.exe) indicates that TCP connection is established on port 9000. However, nothing is reported in Netbeans.

I tried several different alternatives, for example:

  • Installing a similar IDE, Eclipse PDT. Eclipse shows that Xdebug is at work. However, since Eclipse lacks features, I need me to want to use Netbeans.
  • Install NetBeans on Ubuntu 12.04 LTS.
    All the same problem. Netbeans not working (waiting
    connection). Also the output in browsers shows that Xdebug is working.
0
source share
2 answers

Whenever I install on a new Linux machine: "php xdebug" and netbeans
I run these simple steps and I have always been able to integrate xdebug integration into netbeans.
Therefore, with the data that you provide, I can only help you solve half of your problem.
Allow connection to Linux machines :

Installation with pecl:

# apt-get install php5-dev php-pear


# pecl install xdebug

Or direct installation:

# apt-get install php5-xdebug

find library:

# find / -name 'xdebug.so'
/usr/lib/php5/20090626+lfs/xdebug.so

Edit phi.ini file:

...

zend_extension = / usr / lib / php5 / 20090626 + lfs / xdebug.so
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000

...

Restart the web server in your case: Apache

$ / etc / init.d / apache2 restart


According to what you posted:

Install NetBeans on Ubuntu 12.04 LTS.

I used the "apt-get" installation method for the ".deb" distributions. If you use the ".rpm" distribution, you can do the same with "yum"

Many of these commands are undoubtedly simplified in xampp.

But if you execute these commands from the console, this will not affect the final result.


Another important note about Windows machines and Linux machines,
You should verify that your firewall rules allow you to connect to netbeans on xdebug.

+1
source

I know this is deprecated, but for people using Ubuntu, this can help.

OS Version = Ubuntu 14.04.3 LTS; Codename: trusty PHP Version = PHP 5.5.9-1ubuntu4.11 (cli) (built: Jul 2 2015 15:17:32) Apache Version = Server version: Apache/2.4.7 (Ubuntu) 

Procedure

  • Install xdebug for php5
 sudo apt-get install php5-xdebug 
  1. Open php.ini and add the following lines below (usually sudo vim / etc / php5 / apache2 / php.ini)
 xdebug.remote_enable=On; xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000; xdebug.remote_handler="dbgp"; 
  1. Restart apache and your welcome.
 sudo service apache2 restart 

Note 1: I have not tried to do this without the Firefox add-on for xdebug, so if after the above procedure is still not useful, download the add-on for firefox Easy Xdebug

Note 2: I did not touch PHP Netbeans settings

Note 3: I did not touch xdebug.ini

+1
source

All Articles