In the past few days, it may be that Windows 7 has upgraded the patch, and the vsphp and vs2010 that can be normally debugged have the following problem.
Find the following on the Internet:Article:
(From: http://hi.baidu.com/413905282/blog/item/941742088cd803c33ac76378.html)
VUse Apache or iis7 for external debugging in S. php
1. Solve the Problem of Apache debugging errors in Windows 7 vs. php2.7.
Vs. php uses the internal debugging mode by default. Because vs. php2.7 comes with the default internal debugging of Apache and PHP versions,
Incompatibility may occur when running in Windows 7. The specific manifestation is that Apache exits due to an error. solution:
Apache.exe in the change installation directory runs in compatible mode.
Here is c: \ Program Files \ jcx. Software \ vs. php \ 2008 \ 2.7 \ apache2 \ bin \ apache.exe, compatible mode
Select Windows2003
2.. PHP uses iis7 for external debugging
unfortunately, I failed to test it many times, as of now, xdebug 2.1.0beta2 has poor support for iis7, whether in ISAPI or FastCGI mode,
you cannot perform breakpoint debugging.
the method attached to the Internet is actually not capable of breakpoint debugging, it looks pretty good:
right-click the project and select "properties ", on the "properties" Page, select debug and change the debug mode to "external mode ".
set the debug engine to "xdebug ". Finally, change the start URL to the PHP project homepage file set under IIS.
for example: "http: // localhost: 8080/vsphp/index. PHP ". (Note: I created a 8080-Port Website for PHP under iis7.)
3.. use external Apache in PHP for debugging
generally, phper has their own configured development and debugging environment. use the configured Apache + PhP environment for debugging in PHP
what about php Programs ?
(1) download the latest xdebug.dll from the official website http://xdebug.org/download.php (remember to change it to this file name) put it in the ext directory of your PHP Directory
according to your PHP thread-safe mode, select the corresponding version to view the thread safety value of the method phpinfo (),
my PHP is 5.2.12 and thread safety is enable. Therefore, I downloaded 5.2 vc6 (32 bit)
(2) Modify PHP. INI file, add the following Code
zend_extension_ts =" D: \ Server \ server_core \ PHP-apache \ ext \ php_xdebug.dll "
;;;;;;;;;;;;;;;;;;;
; Module Settings;
;;;;;;;;;;;;;;;;;;;
[Xdebug]
Xdebug. idekey = vsphp
Xdebug. remote_enable = 1
Xdebug. remote_port = 7870
Xdebug. remote_autostart = 1
(3) Right-click the project in Vs, select "properties", select Debug on the "properties" page, and change the debug mode to "external mode ".
Set the debug engine to "xdebug ". Finally, change the start URL to the home page of the project in the Apache + PhP environment you have configured.
(4) restart the Apache server
4. Note! Xdebug and zendoptimizer are not compatible. Therefore, when enabling xdebug debugging, disable zendoptimizer in PHP. ini. Add a semicolon before the following:
[Zend]
; Zend_extension_manager.optimizer_ts = "D: \ Server \ server_core \ zendoptimizer \ Lib \ Optimizer-3.3.0 ″
; Zend_extension_ts = "D: \ Server \ server_core \ zendoptimizer \ Lib \ zendextensionmanager. dll"
If xdebug takes effect, you can see it in phpinfo ().
With xdebug v2.1.0beta2-Dev, copyright (c) 2002-2010, by Derick rethans
.
According to the first method, I tried it. It seemed to be good at night. I got up and tried again in the morning, and broke down again. I changed several compatible modes, but none of them worked.
Later, I tried to modify the configuration and finally changed it to the following. The compatibility mode has not been changed.
The main difference is to change the debug engine from xdebug to dbg.
success . Although you do not know why, let's take a look at it.