您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php-debug-apd-调试器

2025/6/17 6:14:33发布24次查看
http://www.phpq.net/doc/php/ref.apd.php
http://pecl.php.net/package/apd
简介
apd 是 advanced php debugger,即高级 php 调试器。是用来给 php 代码提供规划与纠错的能力,以及提供了显示整个堆栈追踪的能力。
        apd 支持交互式纠错,但默认是将数据写入跟踪文件。它还提供了基于事件的日志,因此不同级别的信息(包括函数调用,参数传递,计时等)可以对个别的脚本打开或关闭。
apd 是一个 zend 扩展库,修改了 php 内部处理函数调用的方式,因此有可能与其它 zend 扩展库(例如 zend optimizer)不兼容。
安装
apd 目前作为一个 pecl 扩展,可以从 » http://pecl.php.net/package/apd 得到。确保安装了 cgi 版的 php 并且在当前目录下可以运行,以及可以运行 phpize 脚本。
运行以下命令以下载,编译并安装最新稳定版的 apd:
pear install apd
这将自动把 apd zend 扩展安装到 php 扩展库目录中。不是一定要放到那里,可以将此模块存放到任何 php 可以读取的目录中,只要正确设定了相应的 zend_extension 参数即可。
windows 用户可以从 » http://snaps.php.net/win32/pecl_stable/ 下载扩展库的 dll 文件 php_apd.dll。
在 ini 文件中,加入下面几行:
zend_extension = /absolute/path/to/apd.so
                apd.dumpdir = /absolute/path/to/trace/directory
                apd.statement_tracing = 0
根据 php 版本,zend_extension 指令可以是以下之一:
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)
方法
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
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product