A few days ago, we found that using the dbgp plug-in of notepad ++ and the xdebug extension of PHP can be used to debug PHP files. At the same time, we also introduced that single-step debugging, monitoring variables, and cross-File
Debugging. After configuring the debugging environment according to the network information, I tried it and found that the function was relatively simple and single file debugging was acceptable. It would be uncomfortable for cross-file debugging projects, during the trial, the dbgp plug-in
There are also many defects, troubles constantly, and frequent Stack
Overflow. Sorry. Later, let's think about NP ++, which is just an editor. Don't force too much on it. The version of the plug-in is also relatively low. There are many bugs that can be understood. Wait for it to be improved.
Open-source
Community Is very powerful, ^.
I saw the familiar word "netbeans" again in the blog of a comrade in the altar last night (the former Development Environment was chosen because Nb was very powerful, feature settings were very user-friendly, and the interface was very friendly, there are also non-
Normally strong auto-completion functions are almost always determined. However, because I didn't understand xdebug at the time, so I didn't understand how to debug it, So I continued to use EP
CTRL + B "debug"
Program I added "xdebug" to Google and found that the Nb debugging function is implemented through it. The function is complete and the evaluation is good. Haha, I am very surprised.
Hi, because it's too late for fear of affecting the rest of roommates, I decided to launch it the next day.
......
After coming back today, I made some effort in the development environment. The configuration process is as follows:
[My environment]
OS: Vista Business SP1 en_us
PHP: 5.2.8
Apache: 2.2.11
Netbeans: 6.5.1 PHP
Http://www.netbeans.org/downloads/start.html? Platform = Windows platform = zh_cn & option = PHP & version = 6.5.1
Xdebug: 2.0.4-5.2.8
Http://www.xdebug.org/files/php_xdebug-2.0.4-5.2.8.dll
[Install xdebug]
1. Extract the php_xdebug-2.0.4-5.2.8.dll to the ext folder under the PHP installation directory.
Local: D: \ Wamp \ PHP \ ext
2. Modify PHP. INI, add the following content in the last position:
[PHP]
zend_extension_ts = "D: \ Wamp \ PHP \ ext \ php_xdebug-2.0.2-5.2.5.dll"
xdebug. remote_enable = 1
xdebug. remote_host = 127.0.0.1
xdebug. remote_port = 9000
xdebug. remote_handler = dbgp
[/PHP]
note: the value of zend_extension_ts is subject to the actual installation location; xdebug
conflicts with zend_optimizer. Please comment out/delete PHP. sentences related to zend_optimizer in ini
; xdebug. the value of remote_port must be the same as that of the Nb tool> Options> debugger port. The default value is 9000
;
3. In the Vista environment, the Apache module loads PHP and runs the PHP script Apache after loading xdebug, if you want to debug the PHP program using xdebug normally, you need to change the PHP running mode to CGI. Please go to httpd. add the following content to the conf file:
[PHP]
# loadmodule php5_module D:/Wamp/PHP/php5apache2_2.dll
# phpinidir "D: /Wamp/PHP/"
ScriptAlias/PHP/" D:/Wamp/PHP/"
order allow, deny
allow from all
# Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. php
Action application/X-httpd-PHP "/PHP/php-cgi.exe"
Note: The comment is to load the PHP configuration statement in the module mode.
[/PHP]
[Start debugging]
1. Create and open a project
2. open the file to be debugged and set the breakpoint.
3. Execute
Debug-> debug "XXX. php". In the displayed dialog box, select "server-side PHP ". After you click "OK", Nb automatically uses your default browser to open the file you want to debug,
For example, http: // localhost/comsenz/ucenter_home/index. php?Xdebug_session_start = netbeans-xdebug
. At this time, you will find that the browser's request has not been returned, and the bottom right corner of Nb shows "netbeans-xdebug is running", you can press F7 to debug the program normally.
If no breakpoint is set, the program will automatically pause execution in the first line of the current file when debugging is executed. If you do not want to automatically pause the execution, deselect the tool-> Option-> PHP-> stop on the first line.
4. For form processing debugging, You can execute debugging-> debug the project. The subsequent operations are similar. However, if you execute the script where you set the breakpoint, the NB will be automatically interrupted at the breakpoint, wait for debugging!
5. For details, refer to the Nb official debugging guide http://www.netbeans.org/kb/docs/php/debugging_zh_CN.html.
[Reference Site]
Http://www.netbeans.org/downloads/index.html
(Netbeans download)
Http://www.xdebug.org/download.php
(Xdebug download)
Http://www.my400800.cn
1. Open the project and set the cutoff point. jpg
2. Execute. jpg
32.16.jpg
42.16.jpg
1. "xdebug conflicts with zend_optimizer. Please comment out/Delete the zend_optimizer-related statements in PHP. ini"
I don't know which statements are related to zend_optimizer. Can you give them in detail?
2. My Windows Operating System
PHP 5.2.9
In Apache 2.11
For MySQL 5.1
I don't know if the configuration method is the same as that of the landlord.
3. I also like the development mode of netbeans, but xdebug is always hard to debug and has been done many times according to the instructions on the Internet.
I still can't do it. I finally chose to give up reading the specific configuration method published by the landlord. I am very grateful, but there is still the above.
I hope to receive the fastest and most detailed reply from the landlord to the two questions. Thank you very much.