Debug Session Terminates as Soon as it Starts

The place for general PHP questions and hints for PHP on IBM i
Post Reply
Posts: 1
Joined: Mon Dec 05, 2011 4:43 am

Debug Session Terminates as Soon as it Starts

Post by spflanze » Mon Dec 05, 2011 6:11 am

I am attempting to start remote debugging sessions using the Zend Debugger in Eclipse. When I start the session the expected web page opens in the browser and then the debug session immediately terminates, making it impossible to do debug sessions. When the “Test Debugger” button at “Run > Debug Configurations” is clicked on the test times out with the error: “A timeout occurred when the debug server attempted to connect to the following client hosts/IPs:” where what follows is the IP number of the router where my local machine that runs Eclipse is in the Demilitarized Zone.

No Breakpoints or Expressions are set.

My local machine where Eclipse runs has Windows XP.
The remote machine is Debian 5 with Linux core 2.6.18-028stab094.3
The PHP version is 5.2.17-0.dotdeb.0

I had remote debugging working at the hosting service I migrated my site from. There the Debian 5 core version was 2.6.26-2-686-bigmem. Could my current hosting service's earlier version of Linux core cause this problem?

Posts: 15
Joined: Sun Dec 06, 2009 6:01 pm

Re: Debug Session Terminates as Soon as it Starts

Post by doogle » Thu Dec 08, 2011 5:52 pm

This is happening on my end as well. Unfortunately, the problem is intermittent. Once the debug cursor leaves the index.php page (found in my server root), the Zend Debugger Terminates After the index page and never goes into my IndexController file.

One interesting observation is that Zend Studio seems to load / debug my index.php page twice.

Other observations
- My php.ini has Zend Dubugger hooked up correctly according to a Windows setup viewtopic.php?f=59&t=962
- The ZF application works on web browsers (IndexController is read correctly) except the part I need to debug
- Apache VirturalHost and server seems to be configured correctly

EX. httpd-vhosts.config
<VirtualHost *:80>
ServerName sp
ServerAdmin webmaster@localhost
DocumentRoot C:\Projects\PHP\Addons\sp\public
<Directory C:\Projects\PHP\Addons\sp>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ErrorLog C:\Projects\PHP\Addons\sp\public\error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog C:\Projects\PHP\Addons\sp\public\access.log combined

EX .htaccess (inside 'public' directory)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

EX. hosts file sp

Lastly, my zend studio is set to read ZF files included on my Zend Server.

This too is a mystery to me. Sometimes it works, but most times when I need to create a new ZF project in Zend Studio and then go through the follow up work inside Apache to enable root level access to my index.php ZF file, I the debugger starts to behave funny like mentioned above.

Hope someone has answers.

Doug C.

Post Reply