I was just searching for debugging options in visual studio debugger where I can simulate missing object conditions ie., (this.XX == null). I wanted to know is there any way i can assign a null value to the field “XX” in debug session? What i wanted exactly is equivalent to de-allocating the memory assigned to entire XX field (the XX internally contains several other data structures).
All my search results tells me how to edit but i would like to know how to de-allocate? Does MSVC has any such options?
If you set a breakpoint you should be able to hover over the
this.XXproperty which will bring up its current value, you can then click into the value and replace it withnull.Alternatively you could use a conditional statement in your code like so