开发者

Debugger executes IF when the consition is FALSE

开发者 https://www.devze.com 2023-01-25 08:24 出处:网络
I have run out of all the posibilities with the next开发者_运维知识库 piece of code. The condition in if is false therefore the if should not be executed. But, using the debugger, the execution goes t

I have run out of all the posibilities with the next开发者_运维知识库 piece of code. The condition in if is false therefore the if should not be executed. But, using the debugger, the execution goes to the second line, which is Response.Redirect.

If False Then
            SaveData()
            Response.Redirect("Lop_Approved_Results.aspx?lopId=" & lopId, True)
End If

Why this is happen?


Sounds like your source code might be out of date with your binaries. Try doing a Clean Solution and maybe closing down Visual Studio and then re-build all and see if that helps.


If that is really the logic then what your debugger is showing simply isn't what your computer is executing (debuggers aren't perfect). Have you tried closing down, restarting your IDE and cleaning out the project? Do you actually see the redirect occur, as opposed to only seeing the debugger claim to enter this branch?

0

精彩评论

暂无评论...
验证码 换一张
取 消