Debugging just stopped working

I’ve come across a bug which I’m trying to fix. It seems like it would be a simple fix but I need to interrogate the value of a specific string so I can see what’s wrong.

I can attach the debugger fine, but none of my break points get hit. I tried changing the script so it outputs the value of the string to the console, but even that doesn’t work (I get no output).

I’ve tried:

  • Cleaning and rebuilding the project
  • Restarting VS and Unity
  • Deleting all temporary files (.vs, obj, Library etc.)
  • Deleting the component, creating a new one and reattaching the script
  • Restarting my computer
  • Updating Unity to the latest version

It’s infuriating because all I need to do is hit one break point and I can figure this out, but the debugger has suddenly stopped working which has completely blocked me.

I’m using Unity 2017.1.0f3 and Visual Studio 2015 Update 3 on Windows 10.

If you get no output, that section of your code isn’t even running.

I can’t help without more information. I’m betting on it being because whatever code path you think is being taken, isn’t.