9

I am writing code in Visual Studio 2017, using C# for Unity.

Sometimes, when I add a breakpoint in some places, it is a hollow circle enter image description here, opposed to the normal circle enter image description here. When this happens, the breakpoint doesn't hit.

If I try and place a breakpoint on an empty line or method signature, I get a hollow breakpoint. But I will also get them on valid, debuggable lines of code. I can debug the hollow ones by finding a valid breakpoint above it, and stepping down.

The breakpoints are not disabled: enter image description here

Why are my breakpoints hollow sometimes? What does it mean? How can I stop it?

11
  • 1
    Did you hover over the hollow circle? What did it say? Commented Feb 14, 2018 at 14:31
  • @MichaWiedenmann It doesn't have a tooltip.
    – Evorlor
    Commented Feb 14, 2018 at 14:32
  • Most likely the hollow ones are disabled. Right click on them and enable breakpoint
    – phuzi
    Commented Feb 14, 2018 at 14:34
  • 5
    It is hollow as long as the DLL has not been loaded yet or the pdb file for the DLL could not be found. Use Debug > Windows > Modules to chase it down. If you see the DLL in the list then right-click it to get more info. Oh, wait, whatever you'd do on an Apple machine to get a right-click :) If you don't see it in the list then you need to make sure the relevant statement has executed that forces the DLL to be loaded. Just-in-time. Commented Feb 14, 2018 at 14:53
  • 2
    @HansPassant Thanks! I believe right click on a Mac is Command-Shift-DoubleClick-Pirouette-K
    – Evorlor
    Commented Feb 14, 2018 at 14:58

2 Answers 2

1

In my case I saw this message in the Application Output window:

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

note that at the end of the message it says (no debug symbols). So just simply Cleaning and Rebuilding and also deleting bin and obj folders of all projects worked for me.

1

Had the same problem... closed Visual Studio and reopened, back to normal now.

Not the answer you're looking for? Browse other questions tagged or ask your own question.