Visual Studio Environment Tips

Posted on 8/11/2011 | Printable Version | Comments (0)

This week I had to send my iMac in for repair. Normally I program using Windows Server 2008 running in Parallels. This week I had to go back to my old desktop PC to get my programming work done. I had to reinstall my development environment since I hadn't programmed on that machine in a while. Of course, I start to come across little fixes and items that I've adjusted over time that I don't have on a fresh install. I thought I would create a blog post to log these things for quick reference on how to do them again. Maybe these will be helpful to others out there too.

Track Active item in Solution Explorer

VS.net 2010 changed a default setting. Previously, when you used a tab to look at a different document, the solution explorer would automatically jump down to that file. I found this really helpful when you want to pop open a code behind, or just see what related files are in the same folder, especially in really large projects (like Waypoint!). VS.net 2010's default setting doesn't do this anymore. It's a quick fix to bring it back. Tools >> Options Expand Projects and Solutions >> General Check the box: "Track Active item in Solution Explorer".

Disable Attach Security Warning

This may be due to my programming on Windows Server 2008, but by default if you try to attach to a process, a new warning message appears: "Attaching to this process can potentially harm your computer. If the information below looks suspicious or you are unsure, do not attach to this process." Here's how to kill that message: Go to Control Panel >> Administrative Tools >> Local Security Policy >> Security Settings >> Local Policies >> User Rights Assignment >> Debug Programs Ensure you are a member of this group (I was by default actually, but it's worth checking. Then we need a registry change: Open regedit then navigate to: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger Change the value of DisableAttachSecurityWarning from 0 to 1. Restart all instances of VS.net.

Turn On Line Numbers

I like to have line numbers enabled. It helps finding lines and keeping track of where you are in longer documents and classes. Sometimes you even get a line number from an error report. To turn them on (they're off by default): Tools >> Options >> Text Editor >> ... select the file type you want .. >> General Check the box, "Line Numbers". You'll need to do this for all the applicable types of files where you want to show line numbers.   That's all I have for now, but I'll update this post if I come across more. Let me know in the comments if you have anything valuable!


Comments

Be the first to comment below.

Post Comment