Re: Any way to view CPtrArray, CArray, etc in debugger?



Yes Joseph, that train of thought is *exactly* why we have 120MB bohemoth
apps that take 45 minutes to install and 30 seconds to load.

"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:n4u174dmicpupm7g6ilfgrrf9stlma1hfp@xxxxxxxxxx
Code size is rarely relevant in a program. Unless you are doing an
embedded system, code
size should not matter at all.
joe
On Sun, 6 Jul 2008 00:17:34 -0700, "Somebody" <somebody@xxxxxxx> wrote:

I need to avoid using template classes as much as possible since my
product
is a class library that I ship release and debug versions for. I can't go
crazy with template classes just for the hell of it since they add a lot
of
bloat to the debug version. Yes, I did get a customer complaint about that
and reduced the DLL size by 33% by switching to the non templated versions
in the majority of places.

I did sort of find another solution here:

http://www.shog9.com/log/archives/2-VS2005-DataTips-for-MFC-collection-classes-CMap,-CArray,-etc..html

Using the autoexp.dat file. Not _that_ useful since all I get is the ptrs
and I still have to typecast them in the debugger.


"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:shp074p06c66q6h846tlttcmmatq8n76ir@xxxxxxxxxx
First CPtrArray is rarely good programming practice today; the pointer
probably has a
type, and a better choice would be CArray<Whatever*>. Or better still,
std::vector<Whatever*>

You can look into the array and find its data pointer and examine the
contents of the data
pointer. It's a real pain.
joe

On Sat, 5 Jul 2008 21:56:26 -0700, "Somebody" <somebody@xxxxxxx> wrote:

Is there any way to view the CPtrArray, CArray, etc in the debugger?

For example, if I have:

CPtrArray arr;

<do stuff to fill array>

int i = 0; <---- break here

If I look at arr in the debugger, I can't see the contents of it... just
a
single ptr to the data. I know I can dump it out with TRACE()
statements...
but I'd like to be able to view it in the debugger too.

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm


.



Relevant Pages

  • Re: Any way to view CPtrArray, CArray, etc in debugger?
    ... CPtrArray arr; ... If I look at arr in the debugger, I can't see the contents of it... ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: api function for force delete a file.
    ... still have vestigial traces of the process. ... If the process is stopped in the debugger, ... >trying to delete the file after that - the computer shout that the deleting ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: DllMain & DLL_PROCESS_ATTACH
    ... access fault is OK, Retry, Cancel, where Retry puts you in the debugger. ... but when I put same code in Win32 DLL project DllMain() it raises null ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: VC6-Programm mit VS2005 - Stringprobleme
    ... Lass den Weg. ... Was passiert wenn es kracht dann und Du attached den Debugger. ... Martin Richter [MVP] WWJD http://blog.m-ri.de ...
    (microsoft.public.de.vc)
  • Re: SMQueueExceptionTimeout
    ... >Vielleicht weiß Andre noch etwas. ... Der scheint mir ein richtiger Debugger ... .NET Development ... Carsten Witte [MVP] ...
    (microsoft.public.de.vc)

Loading