KP Solutions

Solutions for Day to Day Technical Problems

Zend Debugger Loading Wrong File While Debugging


I spent about 1 hour figuring out this issue. It was a pain and for no apparent reason, all of a sudden Zend Studio Debugger started to load up wrong file in an include statement, even though the path was specified. The script would work OK if ran without remote debugging, but with Zend Studio Debugger, I got this issue where a wrong file got included instead of a file that should get included.

I put in all debug logs and nothing came up. I was frustrated and I left work for lunch. Then, when I came back I thought that somehow internal path would have got messed up in Zend Studio Settings. There it was — the culprit — wrong path mapping…. As soon as I removed all the path mapping in the php server, issue got resolved.

So for you to resolve your issue, you go to ‘Windows’ -> ‘Preferences’ -> ‘PHP’ -> ‘PHP Servers’ -> Select ‘Default PHP Web Server’ and hit ‘Edit’ and then you click on ‘Path Mapping’ tab. Remove all entries there. I didn’t need any of those, so I removed all of those.

Now you start the debugging session and you should be good to go. Hope this helps ya…




  • Aoikle

    Saved my ass.  Thanks!

  • Dan

    This really helped, thank you! I found that as I debugged Zend Studio would add these bad server path mappings automatically. It seems like a Zend Studio bug.