Help and Support
 

powered byLive Search

FIX: Wrong Type Definition Appears in Visual Studio .NET Debugger

Article ID:822551
Last Review:October 25, 2005
Revision:1.6

SYMPTOMS

When you use Visual Studio .NET 2003 to compile an application, and then you use the integrated debugger to debug the application, the C-style structures may be displayed by using the wrong type definition in the Locals Window.

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, members of a like-named structure that is not currently in execution scope may appear.

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

Back to the top

WORKAROUND

Microsoft strongly recommends that you use unique type definitions. By using unique type definitions, you can avoid any confusion about the true value of a data structure. However, if you cannot use unique type definitions, you can also avoid the problem by using namespaces, as in the following sample code:
namespace MyNamespace {
struct IDENTICALSTRUCT {
...;
};

using namespace MyNamespace;
The debugger can then resolve the type definitions correctly.

Back to the top

RESOLUTION

A supported fix 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 fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?scid=fh;[LN];CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;%5Bln%5D;cntactms)
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 fix has the file attributes (or later) 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
   ------------------------------------------------------
   17-JUN-2003  04:02  7.10.3168.0  237,568  NatDbgEE.dll
   17-JUN-2003  20:20  7.10.3168.0  241,664  Mspdb71.dll

Back to the top

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Back to the top


APPLIES TO
Microsoft Visual Studio .NET 2003 Enterprise Architect
Microsoft Visual Studio .NET 2003 Enterprise Developer
Microsoft Visual Studio .NET 2003 Academic Edition

Back to the top

Keywords: 
kbhotfixserver kbqfe kbvsnet2003sp1fix kbvsnet2003presp1fix kbqfe kbfix kbbug KB822551

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.