Re: Why can't I see static variables in debug window



You shouldn't see it in the Auto window, I'd say. If it's a local, you
should see it in the locals window. If declared outside the routine, at
global scope, it won't be in either.

Paul T.

"Robby" <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AFBB712C-B457-4587-BB22-89EB78C040CA@xxxxxxxxxxxxxxxx
Also,

Not only don't I see x in the local debug window but I don't see in the
auto
debug window either!

--
Best regards
Robert


"Paul G. Tobey [eMVP]" wrote:

No, I'd say that microsoft.public.windowsce.embedded.vc is the right
place,
since this is an eVC question, but we'll try answering here.

So, you're expecting to see the variable in the Auto version of the
variables window no matter what the context is? You'll find that, if
you're
*using* the static in the context where you hit a breakpoint, the value
*is*
shown. If you're expecting it to show up when your code isn't using it,
yes, you're out of luck. If you change the variables window to show
Locals,
you'll see if, if it has local scope. If it's a global, you can always
find
it in the source window and float the mouse cursor over it to see the
value.

Paul T.


"Robby" <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ED17B518-8547-406C-876F-52EC92FCDB69@xxxxxxxxxxxxxxxx
Hi,

I would like to excuse myself for double posting this question, however
I
believe the nature of this question would be better posted in 'Embeded
general questions' for it is more of a general question than a
programming
one.

I am a <newbie> to eVC++, and I was wondering why is it that when I am
in
debuging mode with the debug and variables watch windows open ayt the
bottom
of the screen, I seem to not be able to view the contents of the
variables
that were declared as static?

ex: if I declared a variable like this:

static int cxClient;

and then during the WM_SIZE handler i would like to view cxClient's
value
during a debug session like so:

case WM_SIZE:
cxClient = LOWORD (lParam); //I would like to see the variables
value!!!
cyClient = HIWORD (lParam);
...
...Other code

But I see all other variables except the ones that were declared
'static'.
Also I can add variables to the Quick watch window, but I can only see
the
value of a normal variable but not a static one?

Basically, when I run my app, I click on :

Build> start debug> go

Then the variables screens come on at the bottom of the screen... and
as I
say, I can't see any of the variables which are declared static.

Can anyone help me ?

Thanking you in advance!

--
Best regards
Robert
--
Best regards
Robert





.



Relevant Pages

  • Re: Why cant I see static variables in debug window
    ... Paul T. ... HDC hdc; ... Auto pane of the variable window, because you're about to use it (to ... you can use the Locals pane to see everything... ...
    (microsoft.public.windowsce.embedded)
  • Re: Why cant I see static variables in debug window
    ... Best regards ... HDC hdc; ... Auto pane of the variable window, because you're about to use it (to add ... you can use the Locals pane to see everything... ...
    (microsoft.public.windowsce.embedded)
  • Re: Why cant I see static variables in debug window
    ... Hey Paul, I really want to beleive you man! ... HDC hdc; ... Auto pane of the variable window, because you're about to use it (to add ... you can use the Locals pane to see everything... ...
    (microsoft.public.windowsce.embedded)
  • Re: Why cant I see static variables in debug window
    ... Auto pane of the variable window, because you're about to use it (to add ... you can use the Locals pane to see everything... ... if you're *using* the static in the context where you ... Variables debug window, the value of the variable x does not show. ...
    (microsoft.public.windowsce.embedded)
  • Re: Why cant I see static variables in debug window
    ... if you're *using* the static in the context where you hit ... "If you change the variables window to show Locals, you'll see it, if it has ... Variables debug window, the value of the variable x does not show. ...
    (microsoft.public.windowsce.embedded)

Loading