compiler installation and configuration instructions for PHP xdebug

Source: Internet
Author: User
Tags php tutorial zts
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
[Happy@localhost 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)
[Happy@localhost xdebug]$/usr/local/php/bin/phpize (Execution results can be seen in PHP version date, etc.)

Compiling the Xdebug expansion pack
[Happy@localhost xdebug]$./configure--with-php-config=/usr/local/php/bin/php-config
[Happy@localhost xdebug]$ make (the following message indicates make succeeded)

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

View the extended directory at this time to see that the xdebug.so extension file is installed in the PHP extensions 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 = true Xdebug. remote_host = localhost # Xdebug.remote_port = 9000 #默认端口 9000 Xdebug. 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/extension S/no-debug-non-zts-20121212/xdebug.so "
Windows Thread -safe version php:zend_extension_ts =" D:\php\ext\xd Ebug.dll " Windows Non -thread-safe version php:zend_extension =" D:\php\ext\xdebug.dll " so only one debug tool can be loaded on the same server , 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 = true allow remote IDE debug Xdebug . profiler_enable = On and later directory "/var/www/phpxdebug" function is to open the function that writes the analysis file of the execution to the specified directory, which can be set freely. You can also not sketch a file, such as Cachegrind . out.4408 This format-named file, with the editor open can see many programs run the details of the information

The above describes the PHP xd Ebug compiled installation and configuration instructions, including aspects of the content, want to be interested in PHP tutorial friends helpful.

  • 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.