Solved

debugger

Posted on 2006-11-09
3
300 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
Comment Utility
Are you currently stepping through the code or have you set a breakpoint inside the myAccount() method ?
0
 

Author Comment

by:Autofreak
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

8 Experts available now in Live!

Get 1:1 Help Now