Вопрос

I am trying to get either NetBeans or Komodo IDE to remotely debug PHP. I have a remote website installed on the development machine which is a Mac running Mountain Lion. Xdebug is installed. The website on the local machine runs normally in a browser.

However, for both NetBeans and Komodo IDE, when single stepping through the code, the attempt to execute mysqli_connect fails. In NetBeans there is the following error message:

Socket Exception occured If you have any Watches, try to remove them and restart debugger. If removing Watches does not help or you don't have any Watches, please file an issue and provide the exact steps to reproduce your problem. Please attach the IDE log. Attaching your project would also be very helpful.

I have seen other people reporting this error message, but no help has been provided.

In Komodo IDE, the failure occurs at the same location, but there is no error information provided at all.

The funny thing in NetBeans is that after some single stepping through the first page of the site, if I then run the code from that point, it executes without failure and the web page is displayed in the browser! This means that the problem only occurs while single stepping.

I have seen something somewhere about a bug in NetBeans. But it seems pretty blatant that NetBeans should not be able to single step through code that tries to connect to mysql. Rather I am thinking it would be some configuration issue on my system.

Komodo IDE has the same failure whether single stepping or running any other way. It just does not get past that point.

However, please keep in mind that just running the site in a browser works fine. So what is missing that prevents the Xdebug single stepping from connecting to mysql?

** Additional information **

I have found two instances of xdebug.so on my system.

-rwxr-xr-x  1 root  admin  274508 Oct  6  2011 /opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
-rwxr-xr-x  1 root  wheel  202672 Sep 20 20:01 /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so

Also, there is an /opt/local/var/db/php5/xdebug.ini which references the xdebug.so in the /opt/local path. The xdebug.so in the /usr/lib path is the one that I thought was in use and which corresponds to instructions as to where it should be installed.

These are apparently two different versions of xdebug.so. Could that be related to my problem?

Это было полезно?

Решение

You need to make sure that you are running one version of Xdebug - and also make sure that this is the latest version (2.2.1 at the moment). If you can still reproduce this issue, please file a bug report at http://bugs.xdebug.org with a short sample script (that contains all the code + data!) and a remote debugging log for a debugging session using that script (see http://xdebug.org/docs/all_settings#remote_log on how to make such a log).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top