Remove Debugbreak() calls before committing files to SVN

Since I work mostly on Windows, I develop all my PHP projects in NuSphere PhpEd IDE. And I’m using TortoiseSVN for version control.

The problem is that sometimes after I debugged files locally with debugbreak() calls I forget to remove them before committing to preview and production repositories and so Fatal Errors there usually pisses off our QAs and PMs.

I devised a small WSH Script and set it as a pre-commit hook so that all files are cleaned from debugbreak() right before they are committed.

Just in case someone else suffers from this problem I put it on GitHub along with install instructions. Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.