NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Interesting DBG problem on Windows


Joined: 16 Apr 2005
Posts: 3
Location: Seattle
Reply with quote
Hi there,

I think I may have found an interesting problem with DBG 2.11.32 running in PHP 4.3.10 and Apache, on top of Windows XP SP2.

My web server setup is vanilla Xampp 1.4.13, switched to use PHP 4 instead of PHP 5.

I have correctly installed php_dbg.dll into the extensions directory (after removing the version suffix from the file extension), and verified by looking at phpinfo() output.

I have set my file paths correctly and under certain conditions DBG will stop on breakpoints in .php files: I have to change the file content or attributes (say, using Cygwin touch) and then the debugger works correctly.

If I run more debugging sessions after terminating the first session, DBG doesn't stop on breakpoints. Instead it indicates a breakpoint status of ENABLED | UNRESOLVED.

If I touch the file again the next debugging session works - the status is ENABLED and execution stops when the breakpoint is hit.

Subsequent debugging sessions again don't work, until touching some more...

I have used two different clients - dbg-cli and PHP Eclipse; no difference.

I have also experimented with DBG in PHP and Apache on Linux (Fedora Core 3) and everything works beautifully.

I'm really curious about what might be going wrong here, and then I'd like to know whether the latest, commercial version of DBG also could have this problem. I'd not want to spend on the NuSphere IDE unless the debugger works for me.

Cheers, and thanks - Stefan
View user's profileFind all posts by flebleblebSend private messageMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I believe that DBG is not involved. It does not read files or check their attributes. If you have a breakpoint unresolved, please adjust file mappings and make sure that breakpoint is placed on the line that can be executed. After all check if you have a kind of accelerator/php cache/web proxy etc that might trigger php to bypass normal execution or bypass php at all. To check that look at access log and see the responce code.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 16 Apr 2005
Posts: 3
Location: Seattle
Reply with quote
I think you're almost definitely right, it's hard to see how this could be a problem with DBG itself. Can I check with you on a couple of things?

- Since the debugger does stop on breakpoints when the file has been touched, the file mappings must be correct; agreed?

- Similarly, the breakpoints are definitely on lines that can be executed; otherwise execution would never stop. Right?

That leaves the accelerator/php cache/web proxy/... combo. I'm just using vanilla Xampp, haven't made any configuration changes. Have you experimented with DBG and Xampp running together?

More generally, has anybody that is reading this gotten DBG to work with Xampp? What Apache distributions for Windows have people successfully integrated DBG into? Or does it only work with the NuSphere IDE?

Curious...
View user's profileFind all posts by flebleblebSend private messageMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I havn't heard anything like you described so it's probably a new issue.
BUT first, I'd recommend you check if php is really executed at all. If breakpoints are "bypassed", it may happen because nothing was executed and the page were taken from the local cache. Similarly, if you use HTTP PROXY, it may return cached page instead of real php executing.
Why don't you check Apache's access log as I suggested before?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 16 Apr 2005
Posts: 3
Location: Seattle
Reply with quote
I used Ethereal to look at the packets going back and forth between the debugger client and engine, so I knew the local cache wasn't the problem.

I also stepped through the debugger client and saw the responses it got from the engine.

If I touch the file the debugger engine responds with a status of ENABLED, then if I try another debugging session it responds with a status of ENABLED | UNRESOLVED. Touch the file again and the cycle repeats.

I haven't gotten any new ideas about this, so I'm basically unable to use DBG to debug pages that are served from a Windows machine. It's a bit of a bummer.
View user's profileFind all posts by flebleblebSend private messageMSN Messenger


Joined: 05 Jan 2005
Posts: 16
Location: Austria
Reply with quote
don't use the php version that is distributed with xampp, use a version from www.php.net instead.
View user's profileFind all posts by matSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
ANYWAY, touching the file to get them seen by PHP is not a good solution and LOOKS like a kind of cache is there between php engine and HTTP client (browser). Indeed, you may want to try another PHP distro, like TechPlatform (NuSphere) or original php available from www.php.net.
Also, you may want to check your present php configuration and try to REMOVE modules loaded via zend_extension/zend_extension_ts/extension lines, one by one.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 16 May 2005
Posts: 1
Location: Mierlo/The Netherlands
Reply with quote
Hi All,

I don't know if this issue is still unresolved or even if my remark is related but I'm using Xampp 1.4.13, PHPEdit 1.2.0.146 and DBG (Listener) 2.11.32.

I ran into a problem where DBG worked fine but a debug session wouldn't stop on a breakpoint. After searching all day long I noticed the "[eAccelerator]" in my php.ini. Feeling adventurous (and VERY frustrated) I set "eaccelerator.enable" to "0" (instead of "1"). The debugger now stops on beakpoints nicely.

Hope this helps anyone.

Bye,
Toon
View user's profileFind all posts by toongSend private messageICQ Number
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
yeah, it's known that such accelerators may prevent code from being stepped by a debugger. You need to switch them off in this case or consult with their developers on the issue.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Interesting DBG problem on Windows
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic