Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

debugger

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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