- 浏览: 138401 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
ls0609:
一个带人脸识别的智能照相机demohttp://blog.cs ...
Android 照相机转到真确的方向 -
atgoingguoat:
关注下!!!!!
Android 代码生成界面Sample -
elvishehai:
有没有完整的DEMO
利用java调用c的动态链接库 -
loudawei:
遇到问题了找不到帮忙的人。。
利用JNative实现Java调用动态库 -
jackhe:
利用JNative实现Java调用动态库
Xdebug doc 因为那个网站老是不能访问。晕倒。
Documentation for: Xdebug 2
? Installation
This section describes on how to install Xdebug.
? Basic Features
Xdebug's basic functions include the display of stack traces on error conditions, maximum nesting level protection and time tracking.
? Variable Display Features
Xdebug replaces PHP's var_dump() function for displaying variables. Xdebug's version includes different colors for different types and places limits on the amount of array elements/object properties, maximum depth and string lengths. There are a few other functions dealing with variable display as well.
? Stack Traces
When Xdebug is activated it will show a stack trace whenever PHP decides to show a notice, warning, error etc. The information that stack traces display, and the way how they are presented, can be configured to suit your needs.
? Function Traces
Xdebug allows you to log all function calls, including parameters and return values to a file in different formats.
? Code Coverage Analysis
Code coverage tells you which lines of script (or set of scripts) have been executed during a request. With this information you can for example find out how good your unit tests are.
? Profiling PHP Scripts
Xdebug's built-in profiler allows you to find bottlenecks in your script and visualize those with an external tool such as KCacheGrind or WinCacheGrind.
? Remote Debugging
Xdebug provides an interface for debugger clients that interact with running PHP scripts. This section explains how to set-up PHP and Xdebug to allow this, and introduces a few clients.
? FAQ
Frequently Asked Questions
Documentation for: Xdebug 2
<!-- MAIN FEATURE END -->
» Feature: Installation This section describes on how to install Xdebug. Precompiled ModulesThere are a few precompiled modules for Windows, they are all for the non-debug version of PHP. You can get those at the download page. Installing the precompiled modules is easy. Just place them in a directory, and add the following line to php.ini: (don't forget to change the path and filename to the correct one — but make sure you use the full path ). Also, sometimes the quotes (") should be removed. zend_extension_ts="c:/php/modules/php_xdebug-4.4.1-2.0.5.dll"From PHP 5.3 onwards, you always need to use zend_extension and not zend_extension_ts. PECL InstallationAs of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some UNIX. Installing with PEAR/PECL is as easy as: # pecl install xdebug but you still need to add the correct line to your php.ini: (don't forget to change the path and filename to the correct one — but make sure you use the full path ) zend_extension="/usr/local/php/modules/xdebug.so" Note: You should ignore any prompts to add "extension=xdebug.so" to php.ini — this will cause problems. Installation From SourceYou can download the source of the latest stable release 2.0.5. Alternatively you can obtain Xdebug from SVN: svn co svn://svn.xdebug.org/svn/xdebug/xdebug/trunk xdebug This will checkout the latest development version which is currently 2.1.0beta1. You can also browse the source at http://svn.xdebug.org/cgi-bin/viewvc.cgi/xdebug/?root=xdebug . Compiling
You compile Xdebug separately from the rest of PHP. Note, however,
that you need access to the scripts 'phpize' and 'php-config'. If
your system does not have 'phpize' and 'php-config', you will need to
compile and install PHP from a source tarball first, as these script
are by-products of the PHP compilation and installation processes.
(Debian users
can install the required tools with
Configure PHP to Use Xdebug
CompatibilityXdebug does not work together with the Zend Optimizer or any other extension that deals with PHP's internals (DBG, APD, ioncube etc). This is due to compatibility problems with those modules. Debugclient InstallationUnpack the Xdebug source tarball and issue the following commands: $ cd debugclient $ ./configure --with-libedit $ make # make install
This will install the debugclient binary in /usr/local/bin unless you
don't
have libedit installed on your system. You can either install it, or
leave
out the '--with-libedit' option to configure. Debian 'unstable' users
can
install the library with If the configure script can not find libedit and you are sure you have (and it's headers) installed correctly and you get link errors like the following in your configure.log: /usr/lib64/libedit.so: undefined reference to `tgetnum' /usr/lib64/libedit.so: undefined reference to `tgoto' /usr/lib64/libedit.so: undefined reference to `tgetflag' /usr/lib64/libedit.so: undefined reference to `tputs' /usr/lib64/libedit.so: undefined reference to `tgetent' /usr/lib64/libedit.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status you need to change your configure command to: $ LDFLAGS=-lncurses ./configure --with-libedit |
|||
|
Documentation for: Xdebug 2
» Feature: Variable Display Features Xdebug replaces PHP's var_dump() function for displaying variables. Xdebug's version includes different colors for different types and places limits on the amount of array elements/object properties, maximum depth and string lengths. There are a few other functions dealing with variable display as well. Effect of settings on var_dump()There is a number of settings that control the output of Xdebug's modified var_dump() function: xdebug.var_display_max_children , xdebug.var_display_max_data and xdebug.var_display_max_depth . The effect of these three settings is best shown with an example. The script below is run four time, each time with different settings. You can use the tabs to see the difference. The script
The resultsarray 'one' => string 'a somewhat long string!' (length=23) 'two' => array 'two.one' => array 'two.one.zero' => int 210 'two.one.one' => array ... 'three' => object (test )[1 ] public 'pub' => & object (test )[1 ] private 'priv' => boolean true protected 'prot' => int 42 'four' => array 0 => int 0 1 => int 1 2 => int 2 3 => int 3 4 => int 4 5 => int 5 array 'one' => string 'a somewhat long string!' (length=23) 'two' => array 'two.one' => array 'two.one.zero' => int 210 'two.one.one' => array ... more elements... array 'one' => string 'a somewhat long '... (length=23) 'two' => array 'two.one' => array 'two.one.zero' => int 210 'two.one.one' => array ... 'three' => object (test )[1 ] public 'pub' => & object (test )[1 ] private 'priv' => boolean true protected 'prot' => int 42 'four' => array 0 => int 0 1 => int 1 2 => int 2 3 => int 3 4 => int 4 5 => int 5 array 'one' => string 'a somewhat long string!' (length=23) 'two' => array 'two.one' => array ... 'three' => object (test )[1 ] public 'pub' => & object (test )[1 ] private 'priv' => boolean true protected 'prot' => int 42 'four' => array 0 => int 0 1 => int 1 2 => int 2 3 => int 3 4 => int 4 5 => int 5 array 'one' => string 'a somewh'... (length=23) 'two' => array ... 'three' => object (test )[1 ] ... more elements... Related Settingsxdebug.overload_var_dump
Type: boolean
, Default value: 1
, Introduced in Xdebug 2.1
By default Xdebug overloads var_dump() with its
own improved version
for displaying variables when the html_errors php.ini setting is set
to
1. In case you do not want that, you can set this setting to 0, but
check first if it's not smarter to turn off html_errors.
xdebug.var_display_max_children
Type: integer
, Default value: 128
Controls the amount of array children and
object's properties are shown
when variables are displayed with either xdebug_var_dump()
,
xdebug.show_local_vars
or through Function
Traces
. This setting does
not have any influence on the number of children that is send to the
client
through the Remote Debugging
feature.
xdebug.var_display_max_data
Type: integer
, Default value: 512
Controls the maximum string length that is
shown
when variables are displayed with either xdebug_var_dump()
,
xdebug.show_local_vars
or through Function
Traces
. This setting does
not have any influence on the amount of data that is send to the client
through
the Remote Debugging
feature.
xdebug.var_display_max_depth
Type: integer
, Default value: 3
Controls how many nested levels of array
elements and object properties are
when variables are displayed with either xdebug_var_dump()
,
xdebug.show_local_vars
or through Function
Traces
. This setting does
not have any influence on the depth of children that is send to the
client
through the Remote Debugging
feature.
Related Functions
void
var_dump( [mixed var [, ...]]
)
Displays detailed information about a
variable
This function is overloaded by Xdebug, see the description for xdebug_var_dump() .
void
xdebug_debug_zval( [string varname [, ...]]
)
Displays information about a variable
This function displays structured information about one or more variables that includes its type, value and refcount information. Arrays are explored recursively with values. This function is implemented differently from PHP's debug_zval_dump() function in order to work around the problems that that function has because the variable itself is actually passed to the function. Xdebug's version is better as it uses the variable name to lookup the variable in the internal symbol table and accesses all the properties directly without having to deal with actually passing a variable to a function. The result is that the information that this function returns is much more accurate than PHP's own function for showing zval information.
Example:
<?php
Returns:
a: (refcount=2, is_ref=1)=array ( 0 => (refcount=1, is_ref=0)=1, 1 => (refcount=1, is_ref=0)=2, 2 => (refcount=2, is_ref=1)=3)
void
xdebug_debug_zval_stdout( [string varname [, ...]]
)
Returns information about variables to
stdout.
This function displays structured information about one or more variables that includes its type, value and refcount information. Arrays are explored recursively with values. The difference with xdebug_debug_zval() is that the information is not displayed through a web server API layer, but directly shown on stdout (so that when you run it with apache in single process mode it ends up on the console).
Example:
<?php
Returns:
a: (refcount=2, is_ref=1)=array ( 0 => (refcount=1, is_ref=0)=1, 1 => (refcount=1, is_ref=0)=2, 2 => (refcount=2, is_ref=1)=3)
void
xdebug_dump_superglobals( )
Displays information about super globals
This function dumps the values of the elements of the super globals as specified with the xdebug.dump.* php.ini settings. For the example below the settings in php.ini are:
Example:
xdebug.dump.GET=*
Returns:
void
xdebug_var_dump( [mixed var [, ...]]
)
Displays detailed information about a
variable
This function displays structured information about one or more expressions that includes its type and value. Arrays are explored recursively with values. See the introduction of Variable Display Features on which php.ini settings affect this function.
Example:
<?php
Returns:
array 0 => array 0 => boolean true 1 => int 2 2 => float 3.14 more elements... 'object' => object (stdClass )[1 ] public 'foo' => string 'bar' (length=3) public 'file' => resource (3 , stream ) hen Xdebug is activated it will show a stack trace whenever PHP decides to show a notice, warning, error etc. The information that stack traces display, and the way how they are presented, can be configured to suit your needs. The stack traces that Xdebug shows on error situations (if display_errors is set to On in php.ini) are quite conservative in the amount of information that they show. This is because large amounts of information can slow down both the execution of the scripts and the rendering of the stack traces themselves in the browser. However, it is possible to make the stack traces show more detailed information with different settings. Variables in Stack TracesBy default Xdebug will now show variable information in the stack traces that it produces. Variable information can take quite a bit of resources, both while collecting or displaying. However, in many cases it is useful that variable information is displayed, and that is why Xdebug has the setting xdebug.collect_params . The script below, in combination with what the output will look like with different values of this setting is shown in the example below. The script
The resultsDifferent values for the xdebug.collect_params setting give different output, which you can see below:
ini_set('xdebug.collect_params', '1');
ini_set('xdebug.collect_params', '2');
ini_set('xdebug.collect_params', '3');
ini_set('xdebug.collect_params', '4');
Additional InformationOn top of showing the values of variables that were passed to each function Xdebug can also optionally show information about selected superglobals by using the xdebug.dump_globals and xdebug.dump.* settings. The settings xdebug.dump_once and xdebug.dump_undefined slightly modify when and which information is shown from the available superglobals. With the xdebug.show_local_vars setting you can instruct Xdebug to show all variables available in the top-most stack level for a user defined function as well. The examples below show this (the script is used from the example above).
ini_set('xdebug.collect_vars', 'on'); ini_set('xdebug.collect_params', '4'); ini_set('xdebug.dump_globals', 'on'); ini_set('xdebug.dump.SERVER', 'REQUEST_URI');
ini_set('xdebug.collect_vars', 'on'); ini_set('xdebug.collect_params', '4'); ini_set('xdebug.dump_globals', 'on'); ini_set('xdebug.dump.SERVER', 'REQUEST_URI'); ini_set('xdebug.show_local_vars', 'on');
Related Settings
|
相关推荐
documentation for android sdk API19.2.part2
documentation for android sdk API19.2.part1
documentation for android sdk API19.2.part3
documentation for android sdk API19.2.part4
Online Documentation for Altium Products - Enhanced Library Management Using Integrated Libraries - 2013-11-06
基本文件发展使用子模块git clone --recurse-submodules https://github.com/forensicanalysis/documentation : git clone --recurse-submodules https://github.com/forensicanalysis/documentation 扩展安装hugo...
Documentation for Android SDK API22(part1 / 4) 使用方法: Properties-->Java Build Path 找到android.jar文件,并展开,可以看见Javadoc location没有设置 勾选 workplace location 选择 解压后的路径....\...
Documentation for Android SDK API19.part02.rar,这是最新官方的安卓API 19的可以离线的帮助文档,总共4部分,下载完4部分之后,一起解压就可以了。
Oracle Java Documentation:官方 Java 文档,提供了详细的开发指南和 API 文档。 Java SE Documentation:官方 Java SE 文档,提供了详细的开发指南和 API 文档。 Java EE Documentation:官方 Java EE 文档,提供...
在使用Eclipse开发Android程序过程中,发现鼠标停放在想要查看帮助的类名上面,提示如下信息: Note: This element neither has attached source nor...2,若 Javadoc location中的路径已存在,请查看此路径是否正确。
使用方法: Properties-->Java Build Path 找到android.jar文件,并展开,可以看见Javadoc location没有设置 勾选 workplace location 选择 解压后的路径....\google_apis_x86-1959753-linux-x86。...
使用方法: Properties-->Java Build Path 找到android.jar文件,并展开,可以看见Javadoc location没有设置 勾选 workplace location 选择 解压后的路径....\google_apis_x86-1959753-linux-x86。...
YIO文档这是的来源。设置为了方便安装,请安装node.js(最好是LTS)并运行: npm install 这将安装所有必需的Hugo和Doks。 您也可以使用独立的二进制文件运行Hugo,但这目前尚未经过测试。...贡献要做出贡献,请首先...
Linux Kernel Documentation:官方 Linux 内核文档,提供了详细的开发指南和 API 文档。 Linux Foundation:官方 Linux 基金会,提供了开发相关的资源和工具。 Linux Kernel Mailing List:官方 Linux 内核邮件列表...
The only thing that bugs me is the way we have to find the right documentation for what we search for. Try to search for the .is() function for example. Over 100 matches before the actual function I ...
This documentation includes lessons for teachers and API documentation for developers (check out the index on the left). We hope you enjoy developing for the BBC micro:bit using MicroPython. If you're...
Product Documentation for Red Hat Enterprise Linux 8
【船级社】 DNV Stability documentation for approval.pdf
Combining quick tips for improving deliverables with in-depth discussions of presentation and risk mitigation techniques, author Dan Brown shows you how to make the documentation you're required to ...
Product Documentation for Red Hat OpenStack Platform 10.rar