When you're developing your debugging code, don't forget that just because it's only for debugging doesn't mean that you can forget about security.
I remember one customer who asked (paraphrased)
We have a service, and for testing purposes we want to be able to connect to this service and extract the private data that the service is ...