Search code examples
c#visual-studio-2015monogame

Unable to Debug XNA Game1 Class - VS2015


As the title states, I am unable to debug my Game1 class only. If I place a breakpoint in Game1 and start debugging, I get the message

The breakpoint will not currently be hit. The source code is different from the original version.

I have not made any recent changes to this file. If I place a breakpoint in a different class, it works just fine.

I have:

  • Manually deleted the PDB files
  • Restarted Visual Studio
  • Cleaned and rebuilt the solution
  • Closed and reopened the solution
  • Restarted my computer

Despite not making any changes, the debugger thinks my code file has changed and won't hit any breakpoints. I can turn off the "require code to be the same" option, but I'd rather not do this.

Edit: It's also worth noting that this was working before. I've been working on this particular solution for about a month, and this just started this morning. No changes were made to the file after the last successful debug.

Does anyone know what might be causing this issue?


Solution

  • Make sure the problem project is being built as part of the current Build configuration. :-)