In order to install dbg server part follow instructions below.
1) Have dbg unpacked in appropriate directory OUT of php sources. For example,
in /usr/local/src/dbg
2) Make sure you have compiled and installed php. At least, phpize script
is expected to be installed in /usr/local/bin and php headers to be installed
in phpdir (see phpize).
3) run deferphpize script, ignore all warnings from aclocal
4) go to modules subdirectory and copy dbg.so into appropriate directory where 
you have other php extensions installed
5) edit php.ini
5.1) find 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) find "; Module Settings" comment and add following section after it:
[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on
6) run a script with call to phpinfo() function and see whether dbg is listed 
there.
7) after all you may run cleanup script to remove all intermediate files.

Enjoy.
