0

I m a beginner trying to learn Visual C#(Visual Studio 2008). I was able to run a simple Visual C# program without errors.
I was trying to look at the values of the variables in the DATA TIP in Break Mode.. by hovering over the variable. I have not been able to see the value of the variable in the code. Am i missing anything ?
I did the Debug in Debug Mode and not Release Mode.

Any help will be very appreciated

Thanks

Edited by C#Beginner: n/a

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by C#Beginner
0

Is the variable in scope that you are trying to view? Also, if the code is optimized it may not show.

0

Welcome C#Beginner to DANIWEB!
What do you mean by DATA TIP in Break Mode?
If you hover over a variable, and you don't see anything it probably means tha the variable is out of scope.

0

This is the code.. They are definitely not out of scope.

private void button1_Click(object sender, EventArgs e)
    {
        int a,b;
        a =  int.Parse(textBox1.Text);
        b = int.Parse(textBox2.Text);
        int c = a + b;
        textBox3.Text = c.ToString();

    }

Edited by mike_2000_17: Fixed formatting

0

This is the code.. They are definitely not out of scope.

private void button1_Click(object sender, EventArgs e)
        {
            int a,b;
            a =  int.Parse(textBox1.Text);
            b = int.Parse(textBox2.Text);
            int c = a + b;
            textBox3.Text = c.ToString();
                     
        }// breakpoint

So, you have a breakpoint such as commented above on the closing brace, but still cannot see the vars values when hovering?

0

Thanks Guys..
The MSDN said variable values should be reflected in "BREAK MODE". So I was doing DEBUG--> BREAK ALL :-(.
The BreakPoint worked. I will try learning abt Watch windows and other Debugging stuff now.
Got the lesson..
Thanks again

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.