Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set value of a private list in visual studio debugger

In visual studio you can edit the value of some fields in the locals window or by hovering over them:

enter image description here

However this doesn't work for replacing a list which is a private field (in this case when I write click on _sectionList the Edit value option is greyed out).

Is there anyway to set the value of a private list field in the visual studio debugger?

In particular I want to replace _sectionList with sectionList2.

like image 361
Yair Halberstadt Avatar asked Sep 17 '25 16:09

Yair Halberstadt


1 Answers

You can use the Immediate Window (CtrlAltI) to assign whatever you want to your private fields.

like image 134
Thomas Ayoub Avatar answered Sep 20 '25 07:09

Thomas Ayoub