Integrate xdebug in php (windows platform ). First, go to xdebug. orgdownload. download xdebug from php. if you do not know which one to download, go to xdebug. orgwizard. in php, when you run PHPinfo, the source of the webpage is displayed first to the my phpinfo () output button, which can output the php information installed on your system, for example, what I show is:
SummaryXdebug installed: noServer API: Apache 2.0 HandlerWindows: yes-Compiler: MS VC9-Architecture: x86Zend Server: noPHP Version: 5.4.24Zend API nr: 220100525Php api nr: 20100525Debug Build: noThread Safe Build: yesConfiguration File Path: C: \ WindowsConfiguration File: D :\php-5.4.24-Win32-VC9-x86 \ php. iniExtensions directory: D: \ php-5.4.24-Win32-VC9-x86 \ extInstructions
- Download php_xdebug-2.2.3-5.4-vc9.dll
- Move the downloaded file to D: \ php-5.4.24-Win32-VC9-x86 \ ext
- Edit
D:\php-5.4.24-Win32-VC9-x86\php.ini And add the line
zend_extension = D:\php-5.4.24-Win32-VC9-x86\ext\php_xdebug-2.2.3-5.4-vc9.dll
- Restart the webserver
|
You can follow this step. In addition, you can add the following extension information in the php. ini configuration.
Zend_extension = "D: \ php \ ext \ php_xdebug.dll" Xdebug. profiler_output_dir = "D: \ php53 \ xdebug" Xdebug. profiler_enable = On Xdebug. profiler_enable_trigger = 1 Xdebug. default_enable = On Xdebug. show_exception_trace = On Xdebug. show_local_vars = 1 Xdebug. max_nesting_level = 50 Xdebug. var_display_max_depth = 6 Xdebug. dump_once = On Xdebug. dump_globals = On Xdebug. dump_undefined = On Xdebug. dump. REQUEST = * Xdebug. dump. SERVER = REQUEST_METHOD, REQUEST_URI, HTTP_USER_AGENT Xdebug. trace_output_dir = "D: \ php53 \ xdebug" |
The configuration description is as follows:
Xdebug. default_enable Type: Boolean default value: On If this parameter is set to On, the stack trace is displayed in the error event by default. You can use xdebug_disable () in the code to disable the display of stack trace. This is one of the basic functions of xdebug. it is wise to set this parameter to On.
Xdebug. max_nesting_level Type: integer; default value: 100 The value of this setting is the maximum level of nested functions that are allowed before the script will be aborted. Limit infinite recursive access depth. The value of this parameter is the maximum access depth allowed by the nested program before the script fails.
Xdebug. dump_globals Type: Boolean default value: 1 Restrict whether to display the value of the hyperglobal variable defined by xdebug. dump. *. For example, xdebug. dump. SERVER = REQUEST_METHOD, REQUEST_URI, HTTP_USER_AGENT prints the PHP hyper-global variables $ _ SERVER ['request _ method'], $ _ SERVER ['request _ URI '], and $ _ SERVER ['http _ USER_AGENT'].
Xdebug. dump_once Type: Boolean default value: 1 The value that limits whether the global variable is exceeded should be dumped in all error environments (when set to Off) or just at the beginning (when set to On)
Xdebug. dump_undefined Type: Boolean default value: 0 If you want to dump undefined values from the Super global variable, you should set this parameter to On; otherwise, it will be set to Off.
Xdebug. show_exception_trace Type: integer default value: 0 When this parameter is set to 1, xdebug enforces exception tracking even if an exception is caught.
Xdebug. show_local_vars Type: integer default value: 0 When this parameter is set to not equal to 0, the stack dump generated by xdebug in the error environment will also display all local variables, including uninitialized variables at the top. Note that this will generate a large amount of information, so it is disabled by default.
Xdebug. profiler_append Type: integer default value: 0 When this parameter is set to 1, the file will not be appended when a new requirement is sent to the same file (depending on the xdebug. profiler_output_name setting ). Otherwise, the file will be appended to a new file.
Xdebug. profiler_enable Type: integer default value: 0 The permission to open the xdebug file is to create a file in the file output directory. These files can be read by KCacheGrind to show your data. This setting cannot be set by calling ini_set () in your script.
Xdebug. profiler_output_dir Type: string default value:/tmp This file is written by the profiler file output. you are sure that the PHP user has the write permission on this directory. This setting cannot be set by calling ini_set () in your script.
Xdebug. profiler_output_name Type: string default value: cachegrind. out % p This setting determines the name of the file written by the dump trace.
Remote Debug Related parameter settings Xdebug. remote_autostart Type: Boolean default value: 0 Generally, you need to use a clear http get/POST variable to enable remote debug. When this parameter is set to On, xdebug often tries to enable a Remote debug session and try to connect to the client, even if the GET/POST/COOKIE variable is not the current one.
Xdebug. remote_enable Type: Boolean default value: 0 This switch controls whether xdebug should try to connect to a debug client that listens to the host and port according to xdebug. remote_host and xdebug. remote_port.
Xdebug. remote_host Type: string default value: localhost Select the host on which the debug client is running. you can use not only the host name but also the IP address.
Xdebug. remote_port Type: integer; default value: 9000 This port is used by xdebug to connect to the remote host. 9000 is the default port between the client and the bound debug client. Many clients use this port number. it is best not to modify this setting.
|
Note that if ZendOptimizer has been configured before xdebug is configured, you must first block configurations related to ZendOptimizer, which are generally as follows:
[Zend] Zend_extension_manager.optimizer_ts = "path \ ZendOptimizer-3.3.0 \ lib \ Optimizer-3.3.0" Zend_extension_ts = "path \ ZendOptimizer-3.3.0 \ lib \ ZendExtensionManager. dll" |
...