Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Practice...Remove or Comment out Debugging Code?

Status
Not open for further replies.

cmv131

MIS
Feb 16, 2005
158
US
I am curious to hear some professional opitions on this.

Would you remove (and save elsewhere) all of your code used for debugging?

or

Would you just leave it in your code and comment it out?

My opinion is to remove it and save it elsewhere. It will clean up your code, and make readability much easier...Though it will be a bit more work if you have to hunt down your saved sheet of debug code the next time you have to troubleshoot...

What are your thoughts?
 
Hi,
Probably depends...( Great answer , right?)..

I know some developers that save 2 versions of the asp pages, one with debug code and one without..when needed, the files can be opened side by side ( in good editors) to troubleshoot..




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
i would suggest you to comment it using the method 1 i suggested in the following thread
thread333-1111790

and then leave at the end of your working code...that way you can have access to it and at the same time can use it to debug whenever required...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top