At present, there is a small problem: it is either win7 or 64-bit. When xdebug is installed for netbean today, it takes another half a day to pass. In fact, it may not be the cause of win7 64bit. The summary is as follows:
First give a document, official, address: http://wiki.netbeans.org/HowToConfigureXDebug
1. Install (or decompress) netbean normally. I use version 6.9.
2. Open any project for testing.
3. My server environment is Apache 2.2.15, PHP 5.3.2, so that it runs normally.
4. On the phpinfo page (or user-created page, write <? Phpinfo ()?> ), View the following two items:
Zend extension build |
Api220090626, ts, vc6 |
PHP extension build |
Api20090626, ts, vc6 |
Obtain the vc6 and TS values, which are used later.
5. Go to the http://www.xdebug.org/download.php page and download the DLL files (server version and VC version) that match the two indicators. For example, I need to download 5.3vc6 (32bit ),
At first, I thought it was 64-bit. Later I remembered that my server was installed with 32-bit, so I chose this one.
In fact, when you go to the download page, you will find that there is another 5.3 vc6 non-thread-safe (32 bit) item available for download. How can you choose? At this time, the "ts" mentioned above in phpinfo will play a role. It indicates thread safe, so obviously I cannot describe non-thread-safe, that's what it means. So you need to open the page and compare it carefully.
After downloading it, put it in the ext folder of the PHP installation directory.
6. Open the PHP configuration document PHP. ini and add
Zend_extension = "I: \ easyphp \ PHP \ ext \ php_xdebug-2.1.0-5.3-vc6.dll"
Xdebug. remote_enable = on
Xdebug. remote_handler = dbgp
Xdebug. remote_host = localhost
Xdebug. remote_port = 9000
In the last four lines, zend_extension_zs is used in the first line. As for why I didn't use Zs, this is what I mentioned in the official document at the beginning:
Notice: from PhP 5.3 onwards, you need to use zend_extension and not zend_extension_ts.
My version is 5.3, so it is useless.
In addition, the path in the first line must be an absolute path;
The second and third lines are photocopied;
Line 4: The 127.0.0.1 localhost statement in win7 was commented out and needs to be manually enabled in the hosts file;
The fifth line. Check whether the port is occupied. If it is occupied, change the configuration here to the same port as the configuration in the debugging of "Tools" option "php" in netbean.
7. Open your project, set a breakpoint on the home page, and press F11 for debugging to see if the xdebug connection is successful. If I keep failing, I fail to select the xdebug. dll version. The above details how to choose and how to configure PHP. ini. If you use the Zend engine, you need to comment out all zend_extension related to PhP. ini. Just leave the above lines to try.