为什么我的断点空洞?

时间:2018-02-14 14:30:37

标签: macos visual-studio debugging breakpoints

我在Visual Studio 2017中编写代码,使用C#for Unity。

有时,当我在某些地方添加断点时,它是一个空心圆enter image description here,与正常圆enter image description here相对。发生这种情况时,断点不会发生。

如果我尝试在空行或方法签名上放置断点,我会得到一个空心断点。但我也会使用有效的,可调试的代码行。我可以通过在它上面找到一个有效的断点来调试空心的断点,然后单步调试。

断点未被禁用: enter image description here

为什么我的断点有时会空洞?这是什么意思?我怎么能阻止它?

3 个答案:

答案 0 :(得分:1)

就我而言,我在Application Output窗口中看到了以下消息:

Resolved pending breakpoint for 'Android.Runtime.JNIEnv.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to [0x0](no debug symbols).

请注意,消息末尾的内容为(no debug symbols)。因此,只需清洁重建,并删除所有对我有用的项目的binobj文件夹即可。

答案 1 :(得分:1)

遇到同样的问题...关闭 Visual Studio 并重新打开,现在恢复正常。

答案 2 :(得分:0)

打开Breakpoints窗口(Debug / Windows / Breakpoints)...

before

...然后在方框中打勾...

after

这是一种禁用断点的方法,但是要记住它们的位置。

相关问题