I have a problem with conditional breakpoints - if I place a breakpoint in the code and specify a condition that uses a logical variable, VS crashes once the breakpoint location is reached. If I remove the condition, everything is OK and VS does not crash.
Breakpoint is set in a global subroutine (not in any module), the logical variable is used from a module (let's call it "Settings"), so the subroutine contains the line "use Settings, only : applyCorrection". The breakpoint condition is "applyCorrection.eq..TRUE.".
Am I specifying the breakpoint condition incorrectly?
I use VS 2010 Professional SP1 and IPS XE 2016 Update 3 on Windows 7 Professional SP1.
I am sorry, I forgot to be more specific. The expression is mentioned in my original post, it is
where logical*4 :: applyCorrection is a module variable and "Is true" is used in the breakpoint condition.
I don't know about the innards of the VS expression evaluator, but in Fortran you should have used
IF (applyCorrection) ...
instead of using the comparison operator .EQ., which should not be used to compare logical variables.
applyCorrection.eq..TRUE. ! throws an error applyCorrection.eqv..TRUE. !works ok
In an example I made
but whey not have the condition as just applyCorrection
What I see is that if I use .EQ. in the condition, the breakpoint isn't hit. If I use .EQV. it is. I can also just put the name of the variable as the condition and select "Is true". But I don't get a VS crash. This is in VS2010 with 16.0.3.
additional: I note in your other thread you have VS2010, I tested in VS2013 and at run time that says the condition is invalid so maybe that is an improvement to VS2010 just crashing....
Thank you for your quick help how to make the conditional breakpoint using logical variable work. I will give it a try after updating XE 2016 to Update 4. :-)