PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

调试器协议> <PHP 的调试
Last updated: Mon, 26 Nov 2007

view this page in

使用调试器

PHP 3 中的内建调试器对跟踪一些逻辑 Bug (evasive bugs) 是非常有用的。调试器在 PHP 3 每次启动时连接到一个 TCP 端口。从 web 请求中产生的所有错误信息都将发送到该 TCP 连接。这些信息可以被可运行在 IDE 或者可编程编辑器(例如 Emacs)中的除错服务器处理。

如何设置调试器:

  1. 配置文件中为调试器设置一个 TCP 端口(设定 debugger.port 参数)并且启用它(设定 debugger.enabled 参数)。
  2. 在某处设置该 TCP 端口的监听器(listener)(例如:在 Unix 上使用 socket -l -s 1400 命令)。
  3. 在代码中,运行“debugger_on(host)”,host 指运行 TCP 监听器的主机名或 IP 地址。
现在,所有的错误、警告、注意等的 debug 信息都会显示在那个监听器中。即使使用 error_reporting() 关闭它们,它们也会在监听器中显示



add a note add a note User Contributed Notes
使用调试器
There are no user contributed notes for this page.

调试器协议> <PHP 的调试
Last updated: Mon, 26 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites