Is there anyone out there that finds Visual C++ (ver8) Debugger broken? Specifically with regard to variables out of scope.

I have asked here about specific problems and none of the proposed solutions work. The debugger works on the easiest of things, but half the time, things that are obviously in scope, it complains that they aren't.
The only people who respond, obviously the debugger works for them and I appreciate their advice. But let me see if there's anyone else that has to spend half the day displaying variables with code because the debugger won't.


8 Years
Discussion Span
Last Post by walter clark

You asked for an example. Unfortunately it only shows up with complicated code. Simple stuff it does fine with.

for (j=0; j<NUM_GATES; j++)
{  if (gateArray[j].blackBalled == false)  
    {  for (i=0; i<NUM_GATES; i++)
        {   //diagnoticA = j;
            if (isCloseEnough(gateArray[j].PosX,   gateArray[i].PosX,   
     gateArray[j].PosY,   gateArray[i].PosY,
        gateArray[j].numOfOthers = 0;  

The array indexes are out of scope, as are simple variables here. The structure works in this example. I can watch any aspect of the very complicated structural elements of the array. Other times I can see the simple variables but parts of the structural elements are out of scope. The diagnosticA = j;
is a trick I use to allow me to see variables the debugger can't show me. (I can hover on the diagnosticA and get a number but hovering on the "j" gives nothing.


Edited by Nick Evan: Fixed formatting


are you actually getting compiler errors or is it just not letting you see the values of some of the objects/variables while debugging?


Am I getting compiler errors or is it just not letting me see values.
Even with no compile errors I have trouble with the debugger.

This is a windows program that displays video with lots of graphics and numbers and gages and stuff. So the "using namespace" is used about 6 or 8 times. Things like...
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;

Nowhere is there a std::



i have seen this in my debugger and have no idea what causes it. it might be that there there is a limit on how far the debugger goes to drill down the information of a variable. also under the watch list it has tabs for local, auto witch might also change what is shown.

also my signature doesn't apply to your code. its just to explain to people if they have using namespace std; later in there code they don't need to write std::cout.

Edited by NathanOliver: n/a


Hmm, this problem sounds interesting...
I've just been upgraded to VS2008 Pro, from VS2003 Pro at work and it's been great so far. The ability to see inside std library containers from the debugger without having to add code to log values has been most welcome.

VS2003's debugger was a royal pain in the posterior when it came to seeing what was inside std::library classes, I resorted to using my own logging class to log the details of objects stored in std:: containers.

Anyway, we use some pretty complicated class structures and objects in our product (3D CAD/CAM) and I've not seen any problems with the debugger so far. I'm in the middle of updating/re-implementing some old legacy code at the moment, so I'm going to be using the debugger rather heavily soon enough. I'll keep an eye out for any problems and repost if I spot anything unusual.

Just a thought, and this may sound like a stupid question; but do you have service pack 1 for VS2008 installed? We patched all of our installs to SP1 when we installed VS2008, so none of my dev team have tried it without the service pack.

If you've already got SP1 installed, then I'm out of ideas I'm afraid. I'll keep an eye out, but I've not seen any problems with the debugger yet. None of the other members of my development team have reported any odd behaviour from the debugger either.

However, if you don't have SP1 installed, I'd say that's the most likely cause of the problem you're seeing. As you're probably well aware, Microsoft are notorious for releasing buggy software and then releasing several service packs/patches to gradually address the most major bugs. I've not looked at the release notes for SP1 to confirm or deny my theory, but it's a very distinct possibility that this is a bug that's been fixed by the service pack!

Cheers for now,


Oh hang on... looking at your original post again, you said version 8 not VS2008. Version 8 is VS2005 isn't it?!

Doh! Sorry, if you're using VS2005, disregard my previous post entirely...

Well, almost entirely! It might be worth making sure that you've got all of the relevant service packs installed for the VS2005 IDE.
Cheers for now,


Nathan, Jason,
Thank you gentlemen for commenting.
I believe I'm using the latest; Version 9.0.30729.1 SP
According to Wikipedia article on Visual Studio, that is the latest. In that article there's a note at the bottom about the 2010 version (out in April) and it appears to be improving the debugger a lot. It revealed problems with the debugger that I thought were my fault; like being able to go other calls to a function. It's never been able to do that.


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.