C# – VS2005 SP1 breakpoints in Vista Ultimate 64 not working

cvista64visual-studio-2005

I just migrated to Windows Ultimate 64 SP1, because my system's hard drive crashed. I installed Visual Studio 2005 SP1 and all the patches that Microsoft has recommended. I finally got my source code from my SCM, but now debugging does not stop on any of my breakpoints I have set. This is just a plain Winforms app, nothing fancy.

The first thing I did was to change the build target to x86. No dice. Then I went and downloaded Debugging Tools for x64, still no dice. I set the debugger to break on all exceptions both handled and unhandled. No dice either.

I've been looking at Google search results, but no luck there either. I've been at this for 3 days now with no luck. Has anybody dealt with this issue before?

Update:

The projects are all set to Debug (x86).

Breakpoints stay normal when the debugging session starts.

I already did a re-install, and that didn't work either.

I am running as Administrator and turned off UAC.

I attached to the project using "Attach to Process", and I was able to step into the code that way. I'm hoping to find out why it is not auto attaching, in order to avoid having to do this manually every time.

Best Answer

This is listed as a known issue for VS2005 on Vista (Via MSDN):

Title: Just-In-Time (JIT) Debugging of an elevated process will fail

Description: Elevated processes cannot be JIT Debugged by VS 2005. This includes system processes, such as IIS, and applications started by selecting ‘Run as administrator’.

Workaround: The debugger must be attached manually before the debugger will catch unhandled exceptions or user break points (System.Diagnostics.Debugger.Break, __debugbreak, etc).