Waiting For Connection (netbeans-xdebug) - php

I am using Windows7 of 64 BIT. My PHP version is 5.6.3 (got this using phpinfo();). I am trying to use XDebug with NetBeans. My Netbeans version is 8.0.2. My Xdebug section of phpinfo(); is as below.
I placed below code in php.ini file and restarted Apache as well.
[XDebug]
zend_extension = "D:\XAMPP\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\XAMPP\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host=192.168.1.5
xdebug.trace_output_dir = "D:\XAMPP\tmp"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
I set a Breakpoint in my code of Netbeans. I am getting Waiting For Connection (netbeans-xdebug) at the bottom of Netbeans while I click on Debug project button.
Could any one know where is the problem ??

Since you already have it setup, I assume you checked all the usual suspects:
Config
Remote host
idkey
and so on.
Two things that I tend to forget are:
Select Web Root folder for the project
Make sure your code in Netbeans and on the server is the same. (Just
download the project again)

Related

Xampp portable on USB stick - configure xdebug

I did install xampp portable server on USB stick by downloading the zip version from https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.8.3/
(out of the question's context I want to tell you that first I tried to install it via the installer but was working only on the PC, which the installation was made, so if you install it I suggest you do it like extracting it from the zip file, so it will work on every PC you plug in the flash drive).
So I have NetBeans 8 which I successfully use to debug PHP when I use the locally installed WAMP server.
I'm trying to debug PHP code that is on the portable XAMPP server but I fail.
php.ini xdebug configuration looks like this:
[XDebug]
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.idekey = netbeans-xdebug
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\xampp\tmp\xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_connect_back = 0
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_log = "\xampp\tmp\xdebug\xdebug_remot.log"
xdebug.show_local_vars = 9
xdebug.trace_output_dir = "\xampp\tmp\xdebug"
If someone did this and is this kind to tell me how to do it, it is going to be great.
Thanks
I will share what exactly the problem was.
First I check the result of phpinfo() and I realize that xdebug module is not loaded at all, but the path to the extension was looking pretty right.
Then I changed zend_extension = "\xampp\php\ext\php_xdebug.dll" to zend_extension=php_xdebug.dll and then I was able to debug PHP application hosted on this XAMPP portable server with NetBeans.
Cheers!

XDebug not establishing connection in NetBeans

My XDebug extension is not establishing its connection with netbeans. Following are the settings which i have placed in php.ini file:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost:8080"
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
Please help me in figuring out the problem. Any help would be appreciated.
To debug your php code in Netbeans IDE you should enable XDebug in Netbeans. To do that goto Tools - Options there select PHP tab and ensure that Debugging port and session ID matching with your XDebug configuration in php.ini file. After that click on OK.
Change your php.ini file like this.
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1" <--- here
xdebug.trace_output_dir = "C:\xampp\tmp"
And restart your Apache server [XAMPP or WAMP].
If this solution not working goto
localhost in your browser select PHP version tab right click select all and copy the contents and paste it here. If you have old version of XDebug then download the latest php_xdebug.dll file. Copy it to C:\xampp\php\ext\ directory and it's done.

Can't figure out to let Xdebug work in combination with PhpStorm and XAMPP

I followed this steps, recommended by Xdebug based on phpinfo():
Download php_xdebug-2.4.0rc4-5.6-vc11.dll
Move the downloaded file to C:\xampp\php\ext
Update C:\xampp\php\php.ini and change the line
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0rc4-5.6-vc11.dll
Restart the web server
I also unchecked the 'ignore external connections through unregistered server configurations in PhpStorm. In PhpStorm port 9000 is configured. This port isn't used by an other application.
In the php.ini file I listed the following configuration:
[XDebug]
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0rc4-5.6-vc11.dll
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "C:\xampp\tmp"
The DLL file exists.
I also enabled the debug functionality in chrome via the xdebug addon.
Which step do I miss?
You're probably going to want to set xdebug.remote_enable = 1 or the remote debugging will be disabled.
Also, set the remote debug port phpStorm is set to use:
xdebug.remote_port=9000 (I'm assuming port 9000, it's the default, but check phpstorm)
To debug every request (if you don't have the chrome plugin for a browser for example) use xdebug.remote_autostart = on

xdebug not stopping at breakpoints for webpage

When I run my unit tests on phpunit, the breakpoints are being stopped at. But when the same functions are being run on a webpage, it doesn't stop. It used to stop at breakpoints but a couple days ago, it just started running through them. Anyone got ideas on what could have cause this?
zend_extension = c:\wamp\bin\php\php5.5.12\ext\php_xdebug-2.3.3-5.5-vc11-x86_64.dll
;
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_connect_back=1
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
That it what my php.ini file currently looks like.
Using WAMP server

Installing Xdebug in Eclipse on Mac

I am struggling all day long to get Xdebug working on Eclipse Helios for php on my Mac. I have rewritten my php.ini file which is located at /Applications/MAMP/bin/php/php5.5.3/conf/php.ini as follows;
zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts- 20121212/xdebug.so"
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.idekey =
xdebug.profiler_enable = On
xdebug.profiler_output_dir = “/Applications/MAMP/tmp/xdebug/”
Also, I have Komodo-PHPRemoteDubgging and replaced xdebug.so file in /Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
If I look into phpInfo() I can find the term Xdebug.
Still, when I try to run my web app on eclipse at debug mode, it stops at 57%.
Can somebody help me out on this?
Okay, I think I got the answer to my own question. I have replaced the contents under [xdebug] in the php.ini file with the below contents;
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=Off
xdebug.profiler_enable = On
xdebug.profiler_dir = “/Applications/MAMP/tmp”
xdebug.collect_vars=on
xdebug.collect_params=4
xdebug.dump_globals=on
xdebug.dump.GET=*
xdebug.dump.POST=*
xdebug.show_local_vars=on
I have no idea what the difference is, but now it finally seems to work.

Categories