I have installed Xdebug, and I can confirm from phpinfo()
that it is correctly installed. I have taken all the steps given in all of the sites that come up with
Make sure the remote port is set to 9000 in the xdebug.ini file, mine was set to 8000 and once I changed it, xdebug worked immediately.
Since the information available to me is very sparse, I have to describe the settings in more detail.
Netbeans and xdebug settings.
Ubuntu 12.04 LTS Precise Pangolin
What ought to be installed.
Global settings:
Tools -- Options
PHP settings:
With phpinfo() you get.. see below image.
Only one php.ini is important ! Look at Loaded Configuration File If you wrote a xdebug entry into another "php.ini" file be sure to clear all these entries again. ( xdebug ONLY in one php.ini ). Look also at Additional .ini files parsed. We come to this later.
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
Additional .ini files parsed.
Add or controlling, only the first line must be the same as in the "php.ini".( Without " " )
Make sure that the file is really there!
Make sure that the session.save_path is really there!
Control the xdebug version that should be equal to or greater.( Matching PHP Version-5.3.10-1 ). If everything was done as described in this answer, and it does not work, then it is with great probability of an incorrect or defective "xdebug.so".
Create a new Php Project:
Project Properties:
Sources
In our test program, it is important the Project Folder and Source Folder are exactly alike!
Run Configuration
Start Debug: -- press Debug button
The default Browser opens and remains at Connecting .. stand while Netbeans in debug mode is.
(If Netbeans do not open a Browser or can not connect, go back to Advanced Web Configuration and select Do Not Open Web Browser. Close an reopen the browser and type the URL as seen below)
Go through your code. You will see only something in the browser when you're done with the debugging. Don't forget to press the Stop Button . If you forget this xdebug is running on.
Done:
Try using xdebug.remote_connect_back=1
instead of xdebug.remote_host
to avoid security issues
In fact,
zend_extension=path/to/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
Must be enough.
Make sure that project properties->run configuration->advanced->do not open web browser
option is NOT selected (in netbeans project config).
Also, check project url value in run configuration
The issue wasn't with the configuration of xdebug itself, but how I had NetBeans configured. It was a simple error... basically I was having NetBeans navigate to my /var/www/Application directory, which I hadn't actually set up yet.
Thanks to everyone for their help. I learned a lot about how xdebug works!