Debugging tools, debugging tools, debugging tools! That alone is reason enough for me to do all of my C++ dev work in VS 2005. It tracks down bugs for me, which is exactly what I want in a debugger.
There are three bugs which are easy to overlook which I can recall Visual Studio helping me to track down:
1) Using an uninitialized variable. This comes up fairly infrequently because I initialize everything when I write C code. But every once in a while I inherit some ancient code which doesn't adhere to our coding standards, and that can be tricky. Oftentimes the code is fine, but every so often the debugging framework will catch a case where a particular code path is making use of an uninitialized variable. This sort of bug is painful to track down because it oftentimes is masked by other code paths. However, with VS, I just break into the debugger immediately.
2) Frying the ESP register, which is surprisingly easy to do. When you dynamically load up Win32 APIs, you have to be doubleplus certain that you get the declaration correct, otherwise you can fry the stack pointer. I've blogged about this before, and it can be very tricky to track down. Especially because you generally crash in some other code section, not where the frying occurs. However, in Visual Studio, you break on return from calling the function -- when the frying happens. It makes it trivial to track down and eradicate the bug.
3) Pesky memory corruption. This happens when you allocate X bytes of data, and you promptly write to memory locations beyond X. This type of bug is even worse than uninitialized data and blasting ESP combined as it rarely results in a crash anywhere remotely near the original bug. However, when you use VS's debugging framework, as soon as you attempt to write outside of the range of allocated memory you're dropped into the debugger.
I've caught and fixed several bugs in the REALbasic framework just like the three listed above. All of them have been ancient bugs which have been around since the "dawn of time" and all of them were fixed strictly because Visual Studio makes it trivial to do so.
Psst, I like REALbasic.
But hey, thats just me.
In REALbasic, you can't get into situation #1 or #3, and #2 happens very infrequently (it can only happen if you're using declares which use callbacks into your REALbasic code), so these debugging features are either not needed or would be largely pointless. :-)
Does this mean the RB Debugger will be getting an overhaul soon ?
There are other programming environments, other than REALbasic?
I am shocked!
@Trausti Thor -- no, it means I like Visual Studio 2005 because it's a good environment for doing C/C++ dev work.
Visual Studio is one the main reason I can't just slip straight into Linux or anything else. Teachers requiring projects submitted in VS format.
I'm surprised tha #1 hadn't been flagged as a warning before.
I know CW did this for you.
Not sure if it did it in all circumstances though.
The other two sounds damned handy though !
Now if only I used VS :)