I recently worked on a couple of development projects in which I put the new Visual Studio 2005 through its paces. In doing so, I discovered several productivity tips I'd like to share this month.

7. Customize Your IDE


When you install Visual Studio 2005, you can specify the type of development environment: Visual Basic (VB), C#, or Web. As you switch between development tasks (e.g., between WinForms and WebForms programming) you can use the Import and Export Settings option in the Tools menu to switch between the different IDE styles and save custom development settings.

6. Get T-SQL Debugging


Although SQL Server Management Studio is cool, it can't debug T-SQL. Fortunately, Visual Studio 2005 supports T-SQL development and debugging. To write, run, and debug new code, use the File, New, Project menu option, then select Other Projects, Database Project. To debug existing stored procedures, open Server Explorer, expand the Data Connection and Stored Procedure node, right-click the stored procedure, and select Step Into Stored Procedure.

5. Use Smart Formatting


I hate formatting code only to have Visual Studio.NET 2003 change it when I save and reopen a source file. Visual Studio 2005's Smart Formatting feature solves this problem by saving and restoring your formatting.

4. Try DataTips for Quick Debugging


DataTips are basically like IntelliSense for debugging. When you're in the Visual Studio 2005 debugger, simply move the mouse pointer over a variable that you want to inspect. The DataTips window automatically appears, showing the variable's contents. The window presents a plus sign that lets you see object properties. The DataTips window can cover your code, but pressing Ctrl makes it transparent. That's cool.

3. Don't Overlook Refactoring


Refactoring reduces the time you spend dealing with manual editing tasks and possible compile errors. In the IDE, when you change a variable or object name where it's declared, a small red line appears over the last letter of the name. Clicking the red line opens a dialog box; clicking the box automatically renames the object or variable and all the instances where it's referenced in the source code.

2. Use Code Snippets


Visual Studio 2005 comes with a set of about 200 ready-to-use code snippets for various routines including database access, file-systems access, math operations, and common code patterns. You can add your own snippets, and snippets make a great demo tool. Find snippets at the Tools, Snippet Manager menu option.

1. Use Edit-and-Continue


I love this feature, as do VB programmers everywhere. Edit-and-continue lets you make immediate changes to your code during debugging. This feature has saved me many development hours. Visual Studio 2005 supports edit-and-continue for both VB and C# projects.