Change DateTime in the Microsoft Visual Studio debugger

Viewed 37819

What the.... How do I change the value of a DateTime in the debugger? I can change it, but I get an error when leaving the edit field; it cannot parse it.

Edit: VS 2008, C#

9 Answers

You can do it if you define your DateTime between parenthesis.

(new DateTime(2017, 09, 27))

The most easy option (non generic) =>

In the Value input inside watch window for example Type DateTime.Now then press enter

Et voilĂ  ! :)

You can change the non-public data-value in miliseconds in debugger mode, to change it.

Related