FIX: Wrong type definition appears in Visual Studio .NET debugger (811473)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition

SYMPTOMS

The following scenario describes the problem in the integrated debugger of Visual Studio .NET:
  1. You use Visual Studio .NET to compile an application.
  2. You debug the application by using the integrated debugger.
  3. In the Locals window of the integrated debugger, C structures may appear to have the wrong type definition.
This problem occurs only if there are multiple structures in the project that have the same name, regardless of whether they are scoped independently. When you expand a structure in this window, you may see members of a like-named structure that is not currently in execution scope.

Note This is debugger-specific behavior. The code itself is compiles and runs correctly.

WORKAROUND

It is highly recommended that you use unique type definitions. This will help you avoid any confusion about the true value of a data structure. However, if you cannot do this, use namespaces, as in the following sample code:
namespace MyNamespace {
struct IDENTICALSTRUCT {
...;
};

using namespace MyNamespace;
This way, the debugger can resolve type definitions correctly.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version     Size     File name
   -----------------------------------------------------
   11-Dec-2002  04:33  7.0.9645.0  233,472  Mspdb70.dll
   11-Dec-2002  10:31  7.0.9645.0  229,376  Natdbgee.dll

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:10/3/2005
Keywords:kbHotfixServer kbQFE kbvs2002sp1sweep kbcode kbQFE kbfix kbbug KB811473