The road for me as a long time dot net programmer to switch ‘code’ to PHP was undoubtedly a very bumpy one. Some of the things we took for granted in ASP.Net development can turn out to be struggles for other languages.
I was using Eclipse PDT with xDebug as the debugger(I have never been successful in setting up Zend debugger for Eclipse.), after a few debug sessions, I suddenly got an error when Eclipse reached the first breakpoint: Unexpected termination of script, debugging ended. I searched around, could not find any cure, it looked pretty much a dead end for my php project.
My experience working with open source tools is you do not give up easily. Even though at time I was just getting used to working in Eclipse and started enjoying it, I thought I better to give a try of another famous php IDE, Netbeans, everything was setup quickly, load the project and started debugging again. Unfortunate the luck was not long enough, the same issue comes back for Netbeans too. But it is the useful error message in Netbeans that pointed me to the solution of this problem, it was saying that this error might be caused by some of watches left in Expression panel from last debug session, and it turns out to be exactly the reason for both Netbeans and Eclipse.
Here is a screenshot of Eclipse
The solution is, close the error message box, and go to Expression view, right click, remove all watches, end this session, and start to debug again.
I was using Eclipse PDT with xDebug as the debugger(I have never been successful in setting up Zend debugger for Eclipse.), after a few debug sessions, I suddenly got an error when Eclipse reached the first breakpoint: Unexpected termination of script, debugging ended. I searched around, could not find any cure, it looked pretty much a dead end for my php project.
My experience working with open source tools is you do not give up easily. Even though at time I was just getting used to working in Eclipse and started enjoying it, I thought I better to give a try of another famous php IDE, Netbeans, everything was setup quickly, load the project and started debugging again. Unfortunate the luck was not long enough, the same issue comes back for Netbeans too. But it is the useful error message in Netbeans that pointed me to the solution of this problem, it was saying that this error might be caused by some of watches left in Expression panel from last debug session, and it turns out to be exactly the reason for both Netbeans and Eclipse.
Here is a screenshot of Eclipse
The solution is, close the error message box, and go to Expression view, right click, remove all watches, end this session, and start to debug again.