1

Environment: Visual Studio 2017 1.12.111, C# Windows Forms Application

I am building a multi-formed C# application. I am working on the fourth or fifth form in the "form chain" (ie. starts with one form -> info is entered -> another form is opened x 3). Whenever I make changes to form 4, I need to fill in gibberish in form 1 - 3 which gets very annoying doing it many, many times during debugging. Is there a way I can stop the application execution after a specific form is initialized, change form and control properties -> save, and have the changes reflect on the actual form -> then continue? I'm not sure whether a breakpoint or some other technique can do this, or if it is even possible. It would really make my life easier if there was such a feature... I thank you in advance.

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
Yuriy F
  • 351
  • 1
  • 2
  • 13
  • Set the values of the inputs at design time? Use `#if DEBUG` blocks? – Crowcoder Dec 03 '17 at 01:59
  • If I understand what you are trying to do you can put a break point in your form constructor. Then do a watch on your other forms and from the watch you can change there properties at run time. – Cedar Dec 03 '17 at 04:30
  • @Yuriy F, Sorry for that it is not very clearly, maybe you could share a screen shot about the real issue, do you mean that you want to edit your code during debugging time? If so, how about using Edit and Continue feature in debugging? https://msdn.microsoft.com/en-us/library/x17d7wxw.aspx – Jack Zhai Dec 04 '17 at 09:48
  • Judging by what you have written, this is exactly what unit testing is designed to handle – Neville Nazerane Dec 08 '17 at 06:20

0 Answers0