views:

653

answers:

4

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.

A: 

I am using Visual Studio 2005 with the same patch level on both Windows Server 2008 x64 and Vista x64 SP1 without any issues.

Are you running it as admin? When all else fails, try uninstalling and reinstalling.

Jason Whitehorn
+1  A: 

Couple of questions.

When your code fires up, does the breakpoint become an empty circle with a tooltip that indicates that the breakpoint won't be hit? Or does it become a full circle with a tooltip that indicates the process it's attached to?

You can try manually attaching the debugger to see if you get any traction that way. Just fire up the app and once it's running, go to the debug menu and choose "Attach to Process" - select the process that your app is running in and click "Attach".

I run Vista64 w/o issues - VS2008, though.

Paul Prewett
A: 

Insure that the project is set for a debug compile and not a release compile, as the release compile doesn't contain your debug information.

codewright
+1  A: 

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).

BQ
Thanks for finding this link. I did search MSDN, but I guess I didn't know the right keyword combination to get at it. At least now I know that this is a known issue. Maybe it is time to upgrade the project to Visual Studio 2008, since I have it already installed.
hectorsosajr