Visual Studio 2008 SP1 hangs during debugging
-
Friday, August 29, 2008 12:52 AMYesterday I installed VS 2008 SP1 and .NET Framework 3.5 SP1 on my XP deverlopment machine. I also upgraded my fairly large solution from Framework 2.0 to 3.5.
Now debug is unusable. After single stepping from a breakpoint for about 10 or so steps debug just hangs, every time. If I take Debug -> Stop Debugging it waits for 30 seconds or so then I get a "Stop debugging in progress ..." window with a "Stop Now" button. I've tried waiting 10 minutes and debug didn't end. If I press the button, debug stops.
I have tried removing all the breakpoints, closing and opening visual studio and re-adding a few and the problem still exists. Microsoft Update says I'm p to date.
Was updating a bad choice? I waited until SP1 went from Beta to Release.
Answers
-
Sunday, August 31, 2008 10:49 PM
After much fiddling on Friday I managed to clear up the most of the "hang" problems. What it looks like is that .NET became confused over the "registration" of DLLs (pardon me if I'm not using all the right technical terms). I made a copy of my solution before doing the upgrade and opened the "new" copy. The reason is that I have a directory structure that helps me identify the target .NET framework for different solutions. To clear this up I did:
- Changed the GUID of all projects in the solution (in Assembly Information)
- Opened the old solution and did a CLEAN
- Opened the new solution and did a CLEAN
(Clean doesn't seem to do much)
- Manually deleted all the DLLs, EXEs and PDBs in both solutions
- Used RegEdt32 to search for all entries relating to the old solution and delete them (my changed directory name helped)
- Rebooted at several of these steps.
Debug is now more stable.
For any VS developers reading this, a really useful function would be an option to copy a project or solution and change the GUID during the copy.
All Replies
-
Friday, August 29, 2008 3:31 PMI am having similar issues intersperced with another debugger issue I'm having in another thread:
http://forums.msdn.microsoft.com/en-US/vsdebug/thread/0555a254-235b-45c0-a898-fda6bb45a98b
Help us! Is this an SP1 issue that is known? -
Sunday, August 31, 2008 10:49 PM
After much fiddling on Friday I managed to clear up the most of the "hang" problems. What it looks like is that .NET became confused over the "registration" of DLLs (pardon me if I'm not using all the right technical terms). I made a copy of my solution before doing the upgrade and opened the "new" copy. The reason is that I have a directory structure that helps me identify the target .NET framework for different solutions. To clear this up I did:
- Changed the GUID of all projects in the solution (in Assembly Information)
- Opened the old solution and did a CLEAN
- Opened the new solution and did a CLEAN
(Clean doesn't seem to do much)
- Manually deleted all the DLLs, EXEs and PDBs in both solutions
- Used RegEdt32 to search for all entries relating to the old solution and delete them (my changed directory name helped)
- Rebooted at several of these steps.
Debug is now more stable.
For any VS developers reading this, a really useful function would be an option to copy a project or solution and change the GUID during the copy. -
Monday, October 20, 2008 1:06 PMThank you - this was just what I was looking for.
-
Monday, October 20, 2008 9:39 PMI just converted a WM device project to VS08 and things aren't going well. (This is my first time opening up an existing VS05 project in VS08)
When I try to run the app in the debugger it hangs at a point where the status bar at the bottom says "Loading symbols for [path to the app's executable]..."
I've tried deleting contents of bin & obj folders, clean/rebuild, reboot, etc, etc. All to no avail.
I'm not sure what the GUID is so I don't know how to change that to see if that'll help.
When I try to stop the debugger when it's hung I get an error saying "The debugger wa unable to terminate one or more processes: [0xC75DAD16] myapp.exe: The debugger may be unstable now {NO KIDDING!!}. It is recommended that you save all files and exit {That's about all I can do!}. Forgive the sarcastic interjections, but I'm a little frustrated!
f u cn rd ths u cn gt a gd jb n cmptr prgrmng -
Monday, October 20, 2008 10:43 PMI found another thread a week or so ago (can't find it again) after I had a follow on problerm with debug. I'd be happily stepping from a breakpoint and the debugger would hang. The post suggested that this was a "feature" but it didn't appear before I upgraded to .NET 3.5 (I used VS2008 with 2.0 for a while). The comments suggested that this was particularly related to debugging in threads.
Not that it helped much. If the programming model is supposed to use threads, how come the debugger dioesn't work properly
Did you also try cleaning up the Registry? Because my solution is made up of multiple projects I searched for the directory that the solution is in. Otherwise you could just search for the project output name (DLL or exe). I simply deleted all the entries.I've tried deleting contents of bin & obj folders, clean/rebuild, reboot, etc, etc. All to no avail.
I'm not sure what the GUID is so I don't know how to change that to see if that'll help.
You can find the GUID in Project Properties -> Application -> Assembly Information
I wrote a simple program to generate new GUIDs and copy them to the clipboard:
Public Class Form1
Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
Me.txtGUID.Text = NewGUID()
Clipboard.SetDataObject(Me.txtGUID.Text)
End Sub
Private Function NewGUID() As String
Return Guid.NewGuid.ToString
End Function
Private Sub btnCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click
Clipboard.SetDataObject(Me.txtGUID.Text)
End Sub
End Class
Also, I found that Signing the assemblies seems to be more important after I upgraded.
Project Properties -> Signing -> Sign the assembly -> New
You can generate a new signature for your root project and then use it on all projects in the solution.
I'd also look at the debugging environment on the device/emulator. Try running debug against the emulator. Launch the emulator (on the tools menu) and do a hard reset on it first.
Hope that helps -
Wednesday, April 15, 2009 1:41 AMI've been experiencing problems with debug again over the last few days:
- Debug hangs and the environment becomes unresponsive
- Pressing F11 to single-step just continues execution.
Seems to be improved by:
- Delete all breakpoints
- Clean the Solution
- Close the solution
- Delete all the EXE, DLL (apart from external references) and PDB files in the solution.
- Open the Solution
- Add the breakpoints you need.
I don't really know which of these steps was the effective one.
I wish someone would figure out what SP1 broke and fix it. VS Productivity goes out the window when you have to stuff around with this kind of problem.
-
Thursday, March 11, 2010 2:20 AM
Recently had one machine with this problem occuring, tried the hotfixes, clean files to no avail.
Finally traced the problem to a (seemingly) corrupt .suo file - The .suo file was around 10MB instead of around 300kb
Deleted the file, and everything worked again :)
Hope this helps someone.- Proposed As Answer by Wacksome Tuesday, May 18, 2010 10:54 AM
-
Tuesday, May 18, 2010 10:53 AM
Thank you SO much! I've searched everywhere and nothing helped, but this answer did.- Proposed As Answer by Wacksome Tuesday, May 18, 2010 10:54 AM
-
Tuesday, December 07, 2010 5:02 PM
I tried everything to get my VS 2008 sp1 work? But didn't get anything? I didn't find .suo files in my solution. May I know where i will get .suo files ?
-
Tuesday, March 22, 2011 11:21 AMThank you so much for the suggestion! I have been trying to fix this for hours. All of a sudden every time I started debugging devenv.exe would consume 50% CPU and VS2008 would hang indefinitely. I tried everything I could think of: deleting ASP.NET temp files, clean/rebuild, restart VS, reboot computer... nothing worked. I read this and tried deleting my suo file, and it started working again immediately.
-
Wednesday, June 22, 2011 6:14 AM
Thank you so much for your suggestion.
You save my time. :)
-
Tuesday, January 17, 2012 7:11 PM
Mista G
I was going crazy with this problem. The .suo solution you found fixed my problem. I'm juts curious how did you figured it out?