Using tuples in conditional breakpoints in Visual Studio 2010

420 Views Asked by At

Will this be possible? In F# or C#? Both?

For example, I would like to set a conditional breakpoint in a F# program like that:

[x] Condition:

    myTuple == (3,3)

(o) Is true
(_) Has changed

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

This condition

System.Tuple.Create(3,3).Equals(myTuple)

seems to work for me.

(Note that F# uses the C# expression evaluator in the debugger, which means breakpoint conditions, immediate window, etc, must use C# syntax, not F# syntax, when debugging F# code. In this instance, however, the same code above is correct in both F# and C#.)