I have reproduced this problem on two separate 64-bit machines (both running VS2012). Here's how: Create a new console application with nothing in it but this:
using System.Diagnostics;
namespace ConsoleApplication2
{ class Program
{ static void Main(string[] args)
{
Debug.Assert(false);
}
}
}
Then, open Project settings, navigate to Build-> General -> Platform target:, and select x64 (or, alternatively, select "Any CPU", and disable the "Prefer 32-bit" setting), and run the program.
The Assertion Failed
dialog appears, but hitting "Retry" doesn't break into the code, instead it just opens a "No Symbols Loaded" window, which says "Symbol loading skipped" (see screenshot below).
If I change the Platform target to x86 (or re-enable the "Prefer 32-bit" setting), the Asserts start working properly again.
Notes:
So my question is, how do I get Debug Assertions to break into the code in a 64-bit application? (or why does disabling the "Prefer 32-bit" setting break it?)
I can't explain why this is happening, but, I tried this out and is breaking into the code, it's just breaking at a line deeper in the call stack:
If you bring up the Call Stack window you can navigate to the frame where your Debug.Assert failed.