Solved

debugger

Posted on 2006-11-09
3
301 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 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ConsoleSql 1 34
This code tracks birthdays 3 60
Runtime Error 2 28
Wav problem 4 16
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now