nal
nal

Reputation: 119

Waiting for connection(netbeans-xDebug)-php-XAMPP

I tried to use netbeans to debug php program. And the xdebug is not working. What I have tried is Go to http://xdebug.org/wizard.php to analyse my phpinfo() . I downloaded php_xdebug-2.4.0rc2-5.6-vc11.dll and put it into C:\xampp\php\ext
I also modified php.ini(I am sure it is the correct file) like

zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.0rc2-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 = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1

I also checked port 9000. When netbeans does not debug, I enter netstat -ano | find "9000" from cmd. It comes nothing. While I start debuging throuh netbeans, it comes as the picture below enter image description here

So I thought that the netbeans can interactive with xDebug through port 9000 properly.

The problem might be ip address. So I try to use my ipv4 address(cmd-ipconfig) instead of 127.0.0.1,not working. And also "localhost", not working neither.

I realize that I am working on the university with vpn and maybe the problem comes from firegate or antivirus software. But I can not shut down any of them because I am not the system administrator.

How to deal with this situation? Any help?

I spent entire day for this.

Upvotes: 1

Views: 2373

Answers (1)

nal
nal

Reputation: 119

Problem solved. I tried all but nothing works. Finally I unistalled XAMPP and followed the steps from http://xdebug.org/wizard.php. My final xDebug part in php.ini file is(only uncommented content)

[XDebug]

zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.0rc2-5.6-vc11.dll"

xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"

xdebug.remote_host = "127.0.0.1"

xdebug.remote_port=9000

I thought my problem casued by the configuration in apach server. Because the first time when I wanted to start Apach server from XAMPP control panel, it said error because of port block. So I changed the port number instead of using the default port. And after I reinstalled the XAMPP control panel, I restarted the computer and started Apach server immediatelty to make sure nothing else occupied the port. And all works great. So it might be the problem. Hope useful.

Upvotes: 3

Related Questions