I want to use a conditional breakpoint to break when a variable of type Guid has a particular value.
I know how to add a conditional breakpoint. I've tried to write a condition like this:
departmentId == new Guid("MYGUIDHERE")
But this does not work, it doesn't break. Can anyone tell me how to do this properly?
I have tried setting the conditional break point as you did, but it shows the error:
I guess that action is not supported. So, the alternative way should be:
departmentId.ToString() == "MYGUIDHERE"
In my example, the expression would be:
deptId.ToString() == "ca761232-ed42-11ce-bacd-00aa0057b223"
Another way is using Guid.Parse(string), like this:
deptId == Guid.Parse("ca761232-ed42-11ce-bacd-00aa0057b223")
if departmentId is of type Guid.
departmentId.toString() == "your guid"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With