Php-debug-apd-Debugger

Source: Internet
Author: User
Php-debug-apd-debugger http://www.phpq.net/doc/php/ref.apd.php.
Http://pecl.php.net/package/apd


Introduction

APD is an Advanced PHP Debugger, that is, an Advanced PHP Debugger. It is used to provide PHP code with the ability to plan and correct errors, and to display the entire stack trace.
APD supports interactive error correction, but data is written to the tracking file by default. It also provides event-based logs, so different levels of information (including function calls, parameter transmission, timing, etc.) can be turned on or off for individual scripts.

APD is a Zend extension library that modifies the method of calling PHP internal processing functions, so it may be incompatible with other Zend extension libraries (such as Zend Optimizer.


Install

APD is currently used as a PECL extension and can be obtained from» http://pecl.php.net/package/apd. Make sure that the CGI version of PHP is installed and can be run in the current directory, as well as run the phpize script.

Run the following command to download, compile and install the latest stable version of APD:

Pear install apd

This will automatically install the APD Zend extension to the PHP Extension Library Directory. You do not have to store this module in any directory that can be read by PHP. you only need to set the zend_extension parameter correctly.

Windows users can download the DLL file php_apd.dll for the Extension Library from The» http://snaps.php.net/win32/PECL_STABLE.

Add the following lines to the INI file:

Zend_extension =/absolute/path/to/apd. so
Apd. dumpdir =/absolute/path/to/trace/directory
Apd. statement_tracing = 0

Based on the PHP version, the zend_extension command can be one of the following:

Zend_extension (non ZTS, non debug build)
Zend_extension_ts (ZTS, non debug build)
Zend_extension_debug (non ZTS, debug build)
Zend_extension_debug_ts (ZTS, debug build)


Method

Apd_breakpoint? Stops the interpreter and waits on a CR from the socket
Apd_callstack? Returns the current call stack as an array
Apd_clunk? Throw a warning and a callstack
Apd_continue? Restarts the interpreter
Apd_croak? Throw an error, a callstack and then exit
Apd_dump_function_table? Outputs the current function table
Apd_dump_persistent_resources? Return all persistent resources as an array
Apd_dump_regular_resources? Return all current regular resources as an array
Apd_echo? Echo to the debugging socket
Apd_get_active_symbols? Get an array of the current variables names in the local scope
Apd_set_pprof_trace? Starts the session debugging
Apd_set_session_trace? Starts the session debugging
Apd_set_session? Changes or sets the current debugging level
Apd_set_socket_session_trace? Starts the remote session debugging
Override_function? Overrides built-in functions
Rename_function? Renames orig_name to new_name in the global function table

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.