0

I am attempting to debug a site (hosted on a remote server) from my local machine. I have xdebug installed on the remote machine and enabled remote debugging and auto start options for the xdebug extension.

In some ways it appears to make a connection, the site loads fine, the "debug" icon to right of the browser's search bar is highlighted, and the "styled" error messages even appear. However, it absolutely will not stop at any breakpoints.

I would greatly appreciate any guidance.

Relevant parts of php.ini (on the remote server)

; This setting is on by default.
report_zend_debug = 1
zend_extension = C:\Program Files\PHP\v5\ext\php_xdebug-2.4.1-5.6-vc11.dll

[PHP_XDEBUG-2.4.1-5.6-VC11]
xdebug.remote_enable=1
xdebug.remote_autostart = "On"
xdebug.remote_port=9000

Previously, before I put the applications on a remote server, the debugging worked fine. I have done some looking around and reading up on how it should be done, but with no success.

KellyM
  • 2,472
  • 6
  • 46
  • 90

1 Answers1

0

A few things I noticed that could solve your problem:

First of all there are usually no spaces between the key and the value in .ini files. I'd recommend to remove them since this might cause problems. Furthermore, remote_autostart expects a boolean, not a string. Change it to

xdebug.remote_autostart=1

You also need to tell Xdebug where the debug client is running, so add:

xdebug.remote_host=<ip.of.your.local.machine>

Another option would be to set xdebug.remote_connect_back=1 instead, which is simpler but also less secure (since anybody who can connect to the server can run a debug session). So if possible use remote_host.

Also make sure that the firewall (on either machine) is properly configured and doesn't block anything and that all Xdebug settings match with your settings in Netbeans.

Hope this helps

simon
  • 2,896
  • 1
  • 17
  • 22