Hi.
In our project it had often happened that someone debugged the code on the local PC and then forgets to remove calls to debugbreak() when committing files to the repository and so we got problems on the staging server (luckily not in production). Quick googling didn't get me any ready-to-go solutions. So I wrote a tiny simple script that can be used as pre-commit hook for TortoiseSVN and whose only task is to remove the calls to debugbreak. Maybe it'll be useful for someone else, so I'm putting it on github - https:/ /github.com/ruslanbes/remove-debugbreaks (remove space between / / )
P.S. Alternative solution is to write somewhere in your application's bootstrap files:
if (! function_exists('debugbreak') ) {
function debugbreak() {}
} |
but I prefer to have clean code in the svn.