Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditional breakpoint not working

Conditional Dialog

The above code has a conditional breakpoint set at its bottom line in yellow followed by the Breakpoint Settings dialog which should work with: item.Value == "aday"

However I get the below error, I have searched online for this and can't find any reason why this should fail. Im using VS 2015 Pro.

enter image description here

EDIT- Thank you for pointing out the obvious error on my part, I do normally code in C#. But now using a single '=' I get this??????? I assume that I it equates to an assignment, and adding parenthesis didn't help either?

enter image description here

like image 697
Andrew Day Avatar asked Aug 26 '26 23:08

Andrew Day


2 Answers

Just tested with a sample VB.NET project.
The problem is the ==. This is C# syntax but since you have a VB.NET application you should use a single equal

item.Value = "aday" 

(I have always something new to learn from SO)

like image 122
Steve Avatar answered Aug 29 '26 12:08

Steve


If item.Value.Equals("aday") Then 'Temp If please remove
                    Debugger.Break()
                end if

Works in strict mode.

like image 20
Andrew Day Avatar answered Aug 29 '26 12:08

Andrew Day



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!