Solved

debugger

Posted on 2006-11-09
3
306 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
[X]
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
  • 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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