Automating  the debugging in VS 2010

Posted on 2011-03-06
Last Modified: 2012-05-11
Hi there;

I want to automating  the debugging in VS 2010. From this, I mean;

Suppose, you have got a small appl. having 2 forms, in the first form, 2 text boxes and 1 button, in the 2nd form, 1 text area. While debugging for the 2nd form element, I put a breakpoint in the related section of the 2nd form.

When I run for debugging, I have to enter a value in the text box and push the button in the first form at first. I don't want to do that since it's time consuming and directly go to my breakpoint in the second form. ( for 2 forms, it is not time consuming but for 100 forms it sure is).

How can we fix this?

Kind regards.
Question by:jazzIIIlove
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
  • 2
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 333 total points
ID: 35047400
Go into program.cs and change which form is passed to Application.Run():

            Application.Run(new Form2()); // <-- start with Form2 instead of the default Form1
LVL 12

Author Comment

ID: 35047984
But if a parameter is passed from form1 to form2. This fails, right?

Kind regards.

Assisted Solution

MartanElite earned 167 total points
ID: 35048019
If you want Form2 to start then click My Priject in the upper right corner. Then in the Application tab look for "Startup form:" and change it to Form2
LVL 86

Accepted Solution

Mike Tomlinson earned 333 total points
ID: 35048048
"But if a parameter is passed from form1 to form2. This fails, right?"

Well, yeah...if your form is dependent upon external variables then you'll either need to:
(1) Follow the normal flow of your program so they are produced and passed
(2) Hard-code the values into the form temporarily
(3) Modify the form so it pulls the values as command-line arguments and put those in the Project --> Properties --> Debug Tab
LVL 12

Author Comment

ID: 35048389
maybe the question should be that are there any automator for filling the respective values for a solution. Is there any?

Kind regards.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
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!
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

726 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