Using the Debugger

Using the Debugger

The internal debugger in PHP 3 is useful for tracking down evasive bugs. The debugger works by connecting to a TCP port for every time PHP 3 starts up. All error messages from that request will be sent to this TCP connection. This information is intended for "debugging server" that can run inside an IDE or programmable editor (such as Emacs).

How to set up the debugger:

  1. Set up a TCP port for the debugger in the configuration file (debugger.port) and enable it (debugger.enabled).

  2. Set up a TCP listener on that port somewhere (for example socket -l -s 1400 on Unix systems).

  3. In your code, run "debugger_on(host)", where host is the IP number or name of the host running the TCP listener.

Now, all warnings, notices etc. will show up on that listener socket, even if you turned them off with error_reporting().

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.