Netbeans not connecting with xdebug on Wamp : "showing waiting for connection" - php

Following is my configuration in bin\php\php5.3.9\php.ini and bin\apache\Apache2.2.21\bin
[xdebug]
zend_extension = "D:/wamp/php/ext/php_xdebug-2.2.1-5.2-vc9-nts.dll"
xdebug.profiler_output_dir = "D:/wamp/tmp/xdebug"
xdebug.profiler_output_name = "cachegrind.out.%p"
xdebug.profiler_enable = 0
xdebug.profiler_append=0
xdebug.extended_info=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=xdebug
xdebug.remote_log="D:/wamp/tmp/xdebug/xdebug_remot.log"
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0
while I am having php_xdebug-2.2.1-5.2-vc9-nts.dll in wamp/php/ext/ and in \wamp\bin\php\php5.3.9\zend_ext
But still its not showing the xdebug information in phpinfo() and also not connecting with xdebug.
It showing the "waiting for connection" for long while.
Please help me how can I do this configuration

Just decided to post my successful struggle with the Xdebug. All I've done is made this changes to php.ini:
zend_extension = "D:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"
xdebug.remote_enable = 1
xdebug.idekey="netbeans-xdebug"
xdebug.profiler_enable = 1
I hope it helps someone.

For Wamp Server, make sure you are making changes in right php.ini. There are 2 files -
\wamp_server\bin\php\php5.5.12\php.ini
\wamp_server\bin\apache\apache2.4.9\bin\php.ini
I was making changes to the first file. Then I checked php.ini file being used by clicking wampserver icon -> PHP -> php.ini (The location of this file was inside apache directory & not php as I was assuming)
Altering this second file did the trick for me.
Edit php.ini files to contain this code:
zend_extension=[path to xdebug .so/.dll]
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

To connect with netbeans you will have need to configure in the Tools>Options>PHP>Debugger settings and in your php.ini above you need to change:
xdebug.idekey=xdebug
to
xdebug.idekey="netbeans-xdebug"
hope that helps

Related

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.

Xdebug PhpStorm 2016.2

I have followed this guide however when I start debuggin the application it debugs every single action and not only the breakpoints that I marked.
the php.ini configuration is the following:
[Xdebug]
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.1-5.6-vc11.dll
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.idekey=PHPSTORM
xdebug.remote_port = 9000
Do I need another step for it to work..? thanks in advance

Waiting For Connection (netbeans-xdebug)

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)

Notepad ++ DBGp Debugger plugin not working

i'm already two days trying to configure the notepad ++ DBGp debug plugin and its still not working.
I already search a lot of internet site's but no succes.
My setup is the following:
I have my pc:
with notepad ++ installed on.
and i have a windows server running with iis7 and has the following ip :10.83.A.B
On the windows server i installed Xdebug in the php.ini file:
zend_extension = C:\PHP\ext\php_xdebug-2.2.5-5.5-vc11-nts.dll
[PHP_XDEBUG-2.2.5-5.5-VC11-NTS]
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=10.83.A.B
xdebug.remote_port=9000
xdebug.remote_log="C:\inetpub\wwwDevelop\logs"
xdebug.idekey=debug
if i check phpinfo the Xdebug module is showed.
the DBGp configuration on my laptop in notepad is the following;
Remote Server : 10.83.A.B
IDE KEY : debug
Remote Path:\\SERVER-NAME\inetpub\wwwDevelop
Local Path:\\SERVER-NAME\inetpub\wwwDevelop
I had the same situation, adding in all the following got it working for me. Substituting paths of course. Perhaps you're missing an important one...
zend_extension = C:\PHP\ext\php_xdebug-2.2.5-5.5-vc11-nts.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_mode=req
xdebug.idekey=default
xdebug.remote_log="D:/www/ourcommunity.dev/log/xdebug.log"
xdebug.remote_port=9000
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0

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