Posts

Showing posts from July, 2009

Visual Studio .NET 2008 - Some conditional breakpoints not getting triggered and workaround.

If you read some debugging tips or reference on conditional breakpoint. You would notice that what is in the instruction should be straightforward and there is no reason why it won't work when you try it out.

However, there are times when you set conditional breakpoint , a very simple one like

say in you code,

string a[] = {"21", "123", "32", "1234", "sds"};

foreach (string myString in stringArray)
{
Console.WriteLine("myString = " + myString); //conditional breakpoint set here.
}


conditional breakpoint set as myString == "1234" but to your surprise, it would not break and stop there.

It is a very simple thing you would do but it just seems not working. For most people, they would just set normal breakpoint there and run a few more iterations and bypass the use of the conditional breakpoints but this is not my liking. This is a VS.NET function that I would really like it to work. It is afterall a very…