I've been trying to configure xdebug to work along with netbeans, my current configuration is
[xdebug]
zend_extension="C:\binaries\php\ext\php_xdebug-2.1.0RC1-5.3-vc6.dll"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1 (also tried localhost)
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"
I tried the test provided by a netbeans blog explaining how to test if the configuration works when binding it just outputs "unable to bind"
Any suggestions?
A couple of things off the top of my head...
Firstly, check that nothing else is already listening to port 9000 (on the command line, type netstat -an ).
If that doesn't show anything, make sure the Windows Firewall is not enabled.
This was my Solution for the same issue.
The Configuration of xdebug in the php.ini is minimalized.
php.ini:
[XDebug]
zend_extension = C:\Bitnami\wampstack-5.6.21-2\php\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_autostart=0
xdebug.remote_connect_back=0
Right click Project > Run configuration:
Project URL: http://127.0.0.1:9000/<ProjectName>/
Index File: index.php
Tools > Options > PHP > Debugging
Debugger Port: 9001
Session ID: netbeans-xdebug
Maximum Data Length: 2048
uncheck all Checkboxes
The Debugger Port has to be another than the Server Port. The Ports defined in netbeans have to match the one defined in php.ini(xdebug-port) and httpd(apache-port)
Server: 127.0.0.1:9000
XDebug: 127.0.0.1:9001
Close netbeans and restart the server, open Netbeans and press CTRL+F5 (Run Debug).
This worked For Ubuntu 16.04, Net beans 8.2
open xdebug.ini (for me it was in /etc/php/{php-version}/mods-available) and put
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000
Net beans -> Tools > Options > PHP > Debugging
Debugger Port: 9000
Session ID: netbeans-xdebug
Maximum Data Length: 2048
unchecked all Check-boxes here.
My configs were just fine as mentioned above but it wasn't working fine until i unchecked all check-boxes as mentioned by #Beka.
Related
I want to use Xdebug for remote server on my local machine. I have started Xdebug on php-fpm container.
Here is my php-fpm\xdebug.ini file (same as workspace\xdebug.ini)
xdebug.remote_host="host.docker.internal"
xdebug.remote_connect_back=0
xdebug.remote_port=9009
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=0
xdebug.remote_enable=1
xdebug.cli_color=0
xdebug.profiler_enable=0
xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling"
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
xdebug.mode=debug
xdebug.client_port=9009
xdebug.start_with_request=yes
xdebug.discover_client_host=1
In PhpStorm, I've created new server like this:
DBGp Proxy:
and Xdebug port:
I am able to run my project on browser by going http://localhost
However, I can't pass validate in PhpStorm debug configuration
Any thoughts?
I'm trying to connect PhpStorm and debug PHP scripts/webpages with Xdebug, something I've done several times.
This is my php.ini file (the interesting bit):
[xdebug]
zend_extension=C:\xampp\php\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_port=10000
xdebug.remote_mode=req
I set multiple breakpoints and called xdebug_break() on my index but code execution is not stopping at them.
This is the PhpStorm validation script output for Xdebug:
The output of netstat which shows that PhpStorm is listening on port 10000:
Change
from
xdebug.remote_enable=1
xdebug.remote_port=10000
xdebug.remote_mode=req
into
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_port=10000
Change the lines in the php.ini to
xdebug.mode=debug
and set the port on PhpStorm to listen on 9003 instead of 9000.
In xdebug v3 the default xdebug port was changed to 9003:
https://xdebug.org/docs/upgrade_guide#Step-Debugging
I have gone through all the questions with this title, but I am still stuck here.
Here is my php.ini conf settings
[xdebug]
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.show_local_vars=0
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20
xdebug.show_exception_trace=0
xdebug.idekey="xdebug"
xdebug.remote_log="/tmp/xdebug.log"
here is phpinfo()
here is PhpStorm server config
PhpStorm xdebug config
Now if I submit the request in debug mode in PhpStorm REST client, I get this error.
Waiting for incoming connection with ide key '19853'
I don't know how else to fix this.
I read a lots of solutions for this common Xdebug's error, but it did not seems to resolve my issue:
netbeans shows “Waiting For Connection (netbeans-xdebug)”
Netbeans not connecting with xdebug on Wamp : “showing waiting for connection”
in phpinfo() Xdebug seems properly configured:
And below is my php.ini:
zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5
-5.5-vc11-x86_64.dll"
;
[xdebug]
xdebug.remote_enable=1
xdebug.remote_mode = req
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.idekey=netbeans-xdebug
Netbeans:
Tried disable firewall doesn't seems to help.
Running out of ideas to know what is going on with my Xdebug.
Once you start debugging , Check in your command prompt that netbeans is listening on port 9001 :
C:\Users\***> netstat -ano | findstr 9001
TCP 0.0.0.0:9001 0.0.0.0:0 LISTENING 20928
TCP [::]:9001 [::]:0 LISTENING 20928
the PID in the end (20928 in my case) should belong to netbeans, this can be verified from Windows task manager (after adding pid : view > select columns > pid)
If the PID is not correct or the port is not up., restart netbeans or restart system and it will work
If netbeans has the 9001 port, this means your browser is not listening or getting attached to netbeans. Sometimes browser cannot establish the connection or cannot start properly.
In order to manually attempt a connection , you need to press the debugging button in netbeans and within the next minute or so(before it times out) open the following url in your favorite browser (try different browser if one fails)
localhost/<yoursite>/page/?XDEBUG_SESSION_START=netbeans-xdebug
You may also try switching to embedded browser in netbeans project properties.
You can also try changing the port from 9001 to something else , eg 9002 on both sides , this helps if some other program is trying to connect to port 9001 or trying to listen on this port.
Set
zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5
-5.5-vc11-x86_64.dll";
inside the [xdebug] section , not outside.
remove ; from the end.
wrong:
zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll";
[xdebug]
xdebug.remote_enable=1
.....
right:
[xdebug]
zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
xdebug.remote_enable=1
.....
also try
zend_extension_ts="c:/.../php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
instaed of
zend_extension="c:/.../php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
Finally, managed Xdebug to work follow this article, and one more thing i need to do is when netbeans showing "waiting for connection" message. I need to open the page manually in browser(netbeans not open pop-up itself), added index.php?"XDEBUG_SESSION_START=netbeans-xdebug" to the URL and refresh the page, and then netbeans Xdebug status changed to running right away :)
Thank you guys so much for valuable helps!!!!
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