Why does the debugger's breakpoint condition allow an assignment-statement as bool-condition?

前端 未结 3 643
滥情空心
滥情空心 2021-02-19 00:33

This is very dangerous so I wonder why it\'s allowed. Since I often need to switch between VB.NET and C# I sometimes add breakpoint-conditions like following:

fo         


        
3条回答
  •  鱼传尺愫
    2021-02-19 00:52

    In Visual Studio 2019, variable assignment expressions in Breakpoint conditions no longer work.

    The expression will be evaluated for value, but side effects such as variable assignment are discarded.

    https://developercommunity.visualstudio.com/content/problem/715716/variables-cannot-be-assigned-in-breakpoint-conditi.html

提交回复
热议问题