Sign in to follow this  
jflanglois

VC.NET 2003 Debugger/Derived Class Question

Recommended Posts

jflanglois    1020
Hi, Forgive me if the is in the wrong forum/has already been asked several thousand times (I couldn't find anything). I was wondering whether it is possible to view an object in the Locals or Autos window of VC.NET as a derived type? The reason I ask is that I have a pointer to a base class that is assigned an instance of a derived class and the debugger does not show all of the data members of the derived class (it shows only those of the pointer's type, that is, the base type). I would like to be able to verify values in the derived class. Any help would be appreciated. Regards, jflanglois

Share this post


Link to post
Share on other sites
SiCrane    11839
I don't think you can from the Locals or Autos windows, but you can from a Watch window or even from QuickWatch. Just add (Derived *)ptr as the expression to be evaluated in the watch window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this