Friday, June 17, 2011

GhostDoc - My favorite “New to Me” extension for Visual Studio

Commenting our code is a necessary but sometimes painful exercise for developers. We tend to scrutinize our object structure, method names, and overall terseness and readability of the code itself, but leave commenting for last. I recently ran across a free extension for Visual Studio that makes adding XML documentation comments for your code as simple as a key stroke.

After downloading and installing GhostDoc (all done through an installation wizard, so no there was no headache involved in getting up and running) I opened a project that I was working on and started adding some comments. I started with the LoadData method pictured below:

All I had to do was select the method name, press (CTRL + SHIFT + D) and viola!

Instantly my method was fully commented with relevant summary and parameter information. I continued to go through my project commenting various methods, properties, constructors, event handlers, and delegates.

I was impressed by how fluent the comments were, and how they often included inline references that help Visual Studio IntelliSense.

All in all it took about 20 minutes to add XML documentation comments to my entire project. I ended up manually editing a few of the comments, but all in all, the comments automatically generated by GhostDoc sufficed for 95% of the project.

Released by SubMain ( GhostDoc comes in a free and paid for version. I have not tried the "Pro" version as of yet, but I am so impressed with the free version that I think I will be picking up a license.

No comments:

Post a Comment