Talk to me about debugging

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

I run my programs with F5. I can use F11 to step through them. But, if
it moves to another class or something suddenly it just runs w/o asking
or telling me. I want it to continue making me press F11. Any advice?

Also at the bottom of the IDE are Index Results, Command Window, and
Output windows. I get the command window and output window. I don't
know what the index results window is. And isn't there some window that
I can open that lists variables etc that are currently in memory and
their values? Right now I have to type "? variable" in the command
window. Comments requested and welcomed.
 
Hi CJ,

The Autos Window displays the variables in the current line and the
previous line (Visual C#) or the variables in the current line (where
you've set a breakpoint), and three lines on either side of the current
line.

The Locals Windows is a more detailed version of the Autos Window,
since it lists the values of ALL variables and objects.

I personally prefer the Autos Window during Debugging.

HTH,

Regards,

Cerebrus.
 
Debugging "stops" when the program resumes "listening to events".... i.e.
your class is a Form and you just finished stepping through a Button_Click
event. There's no where else to go. No code is executing (except for the
behind the scenes message pump).

Hunt through the View menu and Debug -> Windows menu to see those other
windows you're after (Locals, Watch, etc).
 
I run my programs with F5. I can use F11 to step through them. But,
if it moves to another class or something suddenly it just runs w/o
asking or telling me. I want it to continue making me press F11. Any
advice?

Also at the bottom of the IDE are Index Results, Command Window, and
Output windows. I get the command window and output window. I don't
know what the index results window is. And isn't there some window
that I can open that lists variables etc that are currently in memory
and their values? Right now I have to type "? variable" in the
command window. Comments requested and welcomed.

It is possible your code has moved from a section compiled in debug mode
to one compiled in release mode.

As for your debugging window question, in addition to the Autos and Locals
window, there is a Immediate window and Watch window which you may wish to
investigate. Additionally, you can right click on a property and select QuickWatch
to see a listing of all of it's property values at that time.

Jim Wooley
 
Back
Top