compiler installation and configuration instructions for PHP xdebug

Source: Internet
Author: User
Tags php debug zts zend

Tag: PHP debug Debug extension extension

Today, a PHP niche asked me php xdebug extension of the problem, and then re-write this note, in fact, this installation configuration is very simple, taking into account the understanding of the novice, equipped with text more detailed and practical simulation operation steps, Daniel slightly can

First open the Linux terminal to execute the command git clone git://github.com/xdebug/xdebug.git download the xdebug extension package, such as: (Please install git first without git)


Then execute the following command to switch to the Xdebug file package directory
[Email protected] www]$ CD Xdebug
Execute the phpize command in the Xdebug directory (specifically replaced with the path of the Phpize file under your actual PHP installation path)
[[email protected] xdebug]$/usr/local/php/bin/phpize (The results of the implementation can be seen in PHP version date, etc.)

Compiling the Xdebug expansion pack
[Email protected] xdebug]$/configure--with-php-config=/usr/local/php/bin/php-config
[[email protected] xdebug]$ make (the following message indicates make succeeded)

Then perform the last step make install to complete the installation
[[email protected] xdebug]$ make install
Appears indicating successful installation and showing the location of the directory where the PHP extension is located

Look at the extended directory to seexdebug.soThe extension file is already installed in the PHP extension directory

Configuring the php.ini file to join the Xdebug extension
[Xdebug]
zend_extension= "/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
Xdebug.remote_enable = True
Xdebug.remote_host = localhost
#default Port 9000
#xdebug. Remote_port = 9000
Xdebug.profiler_enable = On
Xdebug.trace_output_dir = "/var/www/phpxdebug"
Xdebug.profiler_output_dir = "/var/www/phpxdebug"
Xdebug.auto_trace = On
Xdebug.show_exception_trace = On
Xdebug.remote_autostart = On
Xdebug.collect_vars = On
Xdebug.collect_return = On
Xdebug.remote_handler =DBGP
Xdebug.max_nesting_level = 10000
After the php.ini configuration parameter is modified, call the Phpinfo () function in the PHP page to see the extended information and related parameter options in the page Xdebug, and here's my settings:

php xdebug parameter description (for more questions, see the log for Xdebug before picking up stars )Zend_extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so" #加载扩展文件Xdebug. remote_enable =trueXdebug. remote_host = localhost#Xdebug.remote_port = 9000 #默认端口 9000Xdebug. profiler_enable =Onxdebug. Trace_output_dir = "/var/www/phpxdebug"Xdebug. Profiler_output_dir = "/var/www/phpxdebug"#remaining Parameters#turn on automatic trackingXdebug.auto_trace = on#turn on exception trackingXdebug.show_exception_trace = on#Turn on remote debugging auto-StartXdebug.remote_autostart = on#Collection VariablesXdebug.collect_vars = on#Collect return ValuesXdebug.collect_return = on#Application-Layer communication protocol for Zend Studio remote debuggingXdebug.remote_handler =DBGP#If set too small, the function has recursive calls to itself too many times will be reported more than the maximum number of nested errorsXdebug.max_nesting_level = 10000
Zend_extension              = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
Xdebug loading method, different system and PHP version have different wording Linux and Mac OS X: zend_extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
Windows ThreadVersion-safe Php:zend_extension_ts = "D:\php\ext\xdebug.dll"Windows NonVersion-thread-safe php:zend_extension = "D:\php\ext\xdebug.dll"so the same server can only load one debugging tool, either Zend Debugger or Xdebug but in PHP5.5 environment test, thread-safe version of PHP can not add _ts can only be written zend_extension =Xdebug. remote_enable =trueallow remote IDE debug Xdebug. profiler_enable = on and the following directory "/var/www/phpxdebug"function is to turn on the execution of the analysis file to the specified directory functions, can be set freely. can also not be a sketch of a document, such as Cachegrind. out.4408This format-named file, opened with the editor can see a lot of details about the program running

compiler installation and configuration instructions for PHP xdebug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.