3 Replies - 1251 Views - Last Post: 13 December 2016 - 02:50 PM

#1 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 203
  • View blog
  • Posts: 1,731
  • Joined: 13-March 10

Tracking a value of a variabled/field

Posted 13 December 2016 - 05:40 AM

This question is specific to Visual Studio so not sure if in the correct section of the forum.

Anyway, is it possible to track a value of fields -let's say an array of numbers - without actually having to use a debugger. I essentially want my program to keep running, when i click (let's say) a button, the collection will change, but i don't want to keep breakpointing.

So, is there like a quick view window that i can use?

Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Tracking a value of a variabled/field

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13656
  • View blog
  • Posts: 54,498
  • Joined: 12-June 08

Re: Tracking a value of a variabled/field

Posted 13 December 2016 - 06:35 AM

You certainly can change values on a whim, and there are the 'watch' windows.. but typically those only display information when you have paused it all for a break point.
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • blow up my boots
  • member icon

Reputation: 6442
  • View blog
  • Posts: 26,059
  • Joined: 12-December 12

Re: Tracking a value of a variabled/field

Posted 13 December 2016 - 06:44 AM

You could construct a string from the array and send it to the Output or Immediate Window with Debug.WriteLine(".. string of array ..").

(If appropriate you might create a conditional breakpoint, so that it only breaks when a certain condition is met.)
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6512
  • View blog
  • Posts: 14,396
  • Joined: 02-June 10

Re: Tracking a value of a variabled/field

Posted 13 December 2016 - 02:50 PM

Its been a while since I did this but...

Change your project type to Console.
Add Console.WriteLine statements where you want to see some data changes.
F5 debug

You'll get your WinForms app AND a console window - with your console.writeline out put going to the console

This post has been edited by tlhIn`toq: 13 December 2016 - 02:51 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1