NuSphere Corporation
Support Services
Overview
KB
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
Technical FAQ
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla Development
Learn PHP
<Installation and Configuration Q&AWorking with PhpED Q&A>
Last updated: Sun, 13 Nov 2011

Debugger related Q&A

1. FAQ: Does phped support debugging under Apache or IIS ?

Certainly it does. PhpED supports debugging php scripts in any web servers running on Linux, FreeBSD, SunOS, Mac OSX or Windows, regardless remote or local. See HOWTO: install debugger module for further details on how to install debugger module.

2. FAQ: What is DBGSESSID syntax ?

DBGSESSID=nnn[@host][:port][;{flags}]

where

nnn - is session ID (any positive number or zero)
NOTE: negative values prohibit debug session to run and drops cookie

host - is a host name or IP address of the machine where your run the IDE.
You may want to use "clienthost" which is a keyword; in this case debugger will look for client IP address in $_SERVER['REMOTE_ADDR']. If you use SSH tunnel for remote debugging, the address is always 127.0.0.1 (localhost) or ::1.
See this topic for further details on how to set remote debugging through SSH tunnel

flags - set of the following flags delimited with commas:
s=skip - skip number of HTTP requests before actual session should run
d={0|1} - start debuger
p={0|1} - start profiler
c={0|1} - enable/disable session

For example:
DBGSESSID=1@clienthost:7869;d=1,p=1
DBGSESSID=1;d=1,p=0
DBGSESSID=1:7869;d=1,p=0,s=5

See HOWTO: Run debugger and how DBGSESSID can be used.

3. FAQ: When I try to run debuger it fails with timeout message

4. FAQ: After the debugger module was installed php returns error: "PHP Startup: dbg: Unable to initialize module. module compiled with api=XXXXXX. PHP compiled with API=YYYYYY. These options need to match.".

This error means that php is configured to load a dbg module intended for a different PHP version.
PHP API changes from version to version and debugger module has to take these changes into account. To make everything easier php version is added to the dll filename. For example dbg-php-5.2.dll is compatible with php 5.2, while dbg-php-5.3.dll is compatible with php 5.3. Attempt to load dbg-php-5.2 under php 5.3 will result in the following error message:
DBG requires Zend Engine API version 220060519. The Zend Engine API version 220090626 which is installed, is newer.

5. FAQ: An error message saying that I need DBG version 3.9...

PhpED 5.95 can work with debugger modules 3.9.x only.
For your convenience, phped is shipped with debugger modules for all supported server platforms and all these modules can be found in phped\debugger\server subdirectory. For example if you have phped installed in c:\program files\nusphere\phped, you'd check c:\program files\nusphere\phped\debugger\server .

In order to install debugger module, please proceed with HOWTO: install debugger module.

6. FAQ: Can't start debugger on remote server

I inserted DebugBreak() function call into my script running on remote Apache and whenever I launch it though the browser I see x.x.x.x client connected and x.x.x.x client disconnected in DbgListener log window. Nothing else happens. How to run debugger ?

NuSphere PhpED comes with Project Settings Wizard that greatly simplifies setting up the projects and troubleshooting the problems with remote debugging in particular. For further info please proceed with this article




<Installation and Configuration Q&AWorking with PhpED Q&A>
Last updated: Sun, 13 Nov 2011