If I understand the question, you are running into the problem where your local changes to web.config keep getting checked into source control... so if you setup the compilation node for debugging in web.config then check it in, the change will affect other developers?
It is one of the more annoying things about web apps. The technique I use is to just beat the crap out of any of my developers that check in local settings to web.config.
Seriously though... one technique that I've used before is to just limit permissions in source control so that only a master admin account can check in changes to it.
Regular developers don't have rights to change that particular file in source control.
The devs manually remove the read-only flag for their local copy of web.config so they can make any necessary changes for their environments (connection stings, debug settings, etc)... but they cannot check in those changes by accident to source control.
If a change is really needed to the web.config file then we have to log in with the master admin account to make the change.