In order to install dbg server part follow instructions below.
1) Have dbg unpacked in any directory OUT of tree of php sources. For example,
in $HOME/dbg
2) Make sure you have compiled and installed php engine. At least, phpize script
is expected to be installed into /usr/local/bin directory and php headers to be installed
in $phpdir (see phpize scritpt for details).
3) run deferphpize script and ignore all warnings from aclocal
4) go to modules subdirectory and copy dbg.so into directory where 
you have other php extensions installed
5) edit php.ini
5.1) find list of extension= entries and add:
extension=dbg.so
5.2) if you use ZendOptimizer, add:
zend_extension=/pathtophpextensions/dbg.so
just after or immediately before such entry for ZendOptimizer
5.3) somewhere below extension=dbg.so line add the following section:

[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on

6) create and run new php script file with call to phpinfo() function and make sure
dbg is listed there twice: one time in the head and second in the DBG section.

7) after all compiled you may run cleanup script to remove all intermediate files and have clean
directory of sources.

Enjoy.
