Sunday, February 13, 2011

Debugging PHP in Eclipse with XDebug

I got the following error message when I tried to debug a PHP project in Eclipse.

"Unexpected termination of script. Debugging ended."

By looking into the log of XDebug, I found out that this error is actually a timeout of XDebug trying to connect back to the debugging client (in my case, Eclipse). I checked the firewall policy in my system (Windows 7) and it turned out that the inbound connections to Eclipse were all blocked by rule. After I allowed them, this problem was solved.

No comments: