PHP - Remote Xdebug using netbeans

Asked

Viewed 573 times

1

Presenting the environment: I have a virtual server running a Debian 7.2 (64bit) distribution, on this server I have installed Apache 2.2.22 and PHP 5.4.39

My host machine runs OS X 10.11, as a development IDE I am using Netbeans for PHP.

Explaining the use scenario: I created an X project that runs on a remote server, i.e., on the Debian virtual machine mentioned above. In the project settings set the Run as Remote Web Site option (sftp).

Describing the problem: I installed the Xdebug, edited the file /etc/php5/apache2/php.ini and set at the end of it the settings below:

zend_extension="/usr/lib/php5/20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_log="/tmp/xdebug.log"
xdebug.idekey=netbeans-xdebug

However, when I use the netbeans debug option I can see that in the status bar is the menage - Waiting for Connection (netbeans-Xdebug) - and nothing...

I tried everything but nothing worked. Someone would know how to help me?

  • No need to exchange localhost for ip? in fourth configuration.

  • I already tried this, I defined it as 127.0.0.1 and even tested the ip of the host machine, but without success.

  • try switching Xdebug.remote_host=localhost to the ip of your development machine

  • I tried that too and it didn’t work.

1 answer

2

Problem solved.

In the /etc/php5/conf. d path the 20-Xdebug.ini file must be changed to Xdebug.ini and Restart apache.

All right now.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.