Professional PHP Development Environment
 
Home

News

Features

Screenshots

Change log

Download

Debugger

The PHPub Debugger

The PHPub debugger is a Zend engine extension which allows the programmer to step-by-step debug PHP scripts. The debugger communicates via TCP/IP sockets, an architecture which allows you to debug:

  • Locally or remotely
  • On a live web server or against a PHP CGI
  • On Linux or Windows web servers
The debugger is based on the code from the Nexidion project but has been modified to generate a Windows DLL or a Linux .so, as well as modifying its output to make it easier to work with.

I am still working on this code to suit my needs, so anything you see below is subject to change at my whim. If you use this code, please do not send me bug fix patches, since I know there are at least two bugs in the code which I plan to fix my own way when I get to it.

Source Code

Source code for my modifications can be downloaded here: dbgmon_src.zip (Visual C++ Project)

Documentation

The dbgmon.dll attempts to create an outbound socket connection on port 2134 when Zend starts up. The connection is established when one of two conditions is true:

  • A script compile error occurs
  • The first line of a script is about to be executed
The debugger will then begin sending information. A line of information begins with a keyword (see below) followed by data, terminated by a newline ('\n', ASCII char(10)). Newlines, backslashes, and double quotes in data will be escaped 'C style' as \n, \\, and \", respetively. Items which may contain spaces will be enclosed in double quotes.

Keywords From Server

HELO
Usage: HELO