Alex Rivera | Logout

Breakpoint that breaks when data changes in a managed language

Asked 2010-09-28T17:00:46.760
16

I have a class with a list property that seems to lose an element under certain circumstances. I cannot find out when this happens.

So what I'd like to do is set up a Visual Studio breakpoint that will pause the program the moment this value changes. A conditional breakpoint would not work in this scenario, since I have no idea what is removing this breakpoint.

To put it another way, I want my program to stop the moment myList.Count evaluates to a new number.

Any ideas on how to do this?

Edit
Report

1 Answer

2

I'm assuming Visual Studio is IDE.

Set a breakpoint, right click it, select condition, type myList.Count, and choose Has Changed.

answered 2010-09-28T17:31:44.460

Your Answer