Search code examples
visual-studio-2010debuggingvisual-studio-debugging

How to determine what caused a property to change?


I'm using Visual Studio Express 2010 for a small VB.Net project. I have a problem with unexpected changes in the currentCell property of a dataGridView control, and I can't understand what actually causes those changes. I can see that the CurrentCellChanged event is triggered, but I don't know how to find out what comes before that. What is the best way to find that piece of information?


Solution

  • Try setting a breakpoint on a handler for the CurrentCellChanged event. Then you should be able to look higher up in the call stack to see where it was changed.