Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

debugger

Posted on 2006-11-09
3
Medium Priority
?
313 Views
Last Modified: 2010-04-16
Hello Guys,
                 I am little confused here and need you help. See example below. I am invoking a Form2 instance AccRequestForm from a main form's menu bar. AccRequestForm is shown and has a button event button1_Click that is supposed to execute method myAccount(). Actually, it does and I see the message box but I don't see the yellow debugging line explicetly going to the method, it just shows the result of the method. I would like to see the debugger passing over control to the method so I could monitor each code line. Perhaps it has to do with how I activated AccRequestForm? It come on top of the main form when shown and stays there after the button is clicked. Probabbly I should deactivate or hide it on Click event? Where and how do I do that?



Thanks a lot,
Serge


private void reconciliationReportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form2 AccRequestForm = new Form2();

            AccRequestForm.Activate();
           
            AccRequestForm.Show();
        }


System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form2 : Form
    {
        int IOAccount;
       
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
         
            myAccount();
     
        }

        private void myAccount()
        {

            int ll = 10;
            MessageBox.Show("My Number is" + ll +IOAccount);
        }

    }

}
0
Comment
Question by:Autofreak
  • 2
3 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17907479
Are you currently stepping through the code or have you set a breakpoint inside the myAccount() method ?
0
 

Author Comment

by:Autofreak
ID: 17907742
I put a breaking point inside button1_Click event and after I press F10 on myAccount() line the yellow line never goes to the method's body but hangs for a split sec and shows the message window.

Serge
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 17907771
Ah ok. You need to learn a new debugger key :o)

F10 is the Step-over key, which means it will call any methods it encounters but will not step through them. If you press F11 when myAccount() is highlighted then the debugger will step into the method, you can the go back to F10 to step through each line.

Bascially F10 allows you to step through a method without having to drop into the details of any method it calls, to drop into a method call you use F11.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question