views:

28

answers:

3

Intermittently when I start debugging a web application VS hangs (not responding). It will start OK if I run the appllication without debugging. When it has happened once it will do it every time until I delete the vbporj.user file.

This problem appeared when I moved to Win7 64bit. I am using VS2008 Pro and everything is patched up to date. I am using the internal IIS7.

A: 

Try deleting the solution user options file (.suo) where the debug/breakpoint information is stored. You will lose all solution user settings, such as breakpoint locations. When you have "funny" debugging incidents, this is the first thing to try because this file is easily corrupted.

AMissico
I already tried that and it made no difference. The only thing I have found which cures it every time is deleting the vbproj.user file. This is a plain text file and I've looked at the content but can see nothing unexpected there.
Mike Robertson
Does this happen on another Win7 64bit machine?
AMissico
I don't know. I only have one Win7 64bit but I never saw this problem till I started using it.
Mike Robertson
What happens if you duplicate (copy) this solultion/projects into another folder. (Try deleting temporary files first.)
AMissico
+1  A: 

Updates for Visual Studio 2008 SP1 debugging and breakpoints at http://support.microsoft.com/kb/957912.

AMissico
Since my specific problem is not mentioned in this hotfix do you know it will actually cure this? MS recommend not installing the hotfix unless to cure the specific problems mentioned.
Mike Robertson
Then I wouldn't install the hotfix.
AMissico
A: 

Clear all your Visual Studio "temporary" files. Check out the "Clear Recent" script at http://missico.spaces.live.com/blog/cns!7178D2C79BA0A7E3!370.entry.

Modify it for your own needs. For instance, I dislike Flash, so you may want to remove the call to ClearStupidFlash and the other non-Visual Studio calls.

AMissico
Thanks for your response but this is a bit of a sledge hammer approach. I really don't fancy just blanket deleting all temporary files in the hope the problem will go away. I want to find out what the problem is so I can fix it properly. I can already work around it by deleting the .vbproj.user file but I don't know why this works.
Mike Robertson
It is perfectly safe as the script only deletes temporary files. I have been using this script for five years. I run it all the time. At least several times a week. It has fixed numerous "weird" problems of other team members projects. Even helped another SO user. From my experience, Web Site projects are easily corrupted. A combination of this script and cleaning then rebuilding the solution usually fixes all "weirdness". I believe this "weirdness" is due to the source code, compiled code, debug symbols, and so on, get "out-of-sync". Therefore, you must delete the temporary files.
AMissico
I suspect deleting the project's User Options file (.user) forces Visual Studio to reset your debugging options in memory, eliminating the problem. Yet this conflicts with the information in the temporary files associated with this project. I believe that is why it works only on the first time.
AMissico
While writting my comments, I am remembering past difficulties, and I strongly recommend clearing out these temporary files. I believe it will fix your problem. If not, then maybe using Process Monitor from SysInternals may help to show what is causing the problem.
AMissico
I can understand why this may help and your explanation of why deleting the .user file temprarily cures the problem makes sense. I will give the script a try and let you know what happens.
Mike Robertson
WARNING: Not as safe as you thought.It removes some data including my mobile device configuration. This is recreated automatically but with a different identity so you have to reconfigure your sync settings. Also means my Mobile OneNote folder was duplicated but worst of all this new identity means SplashID in which I keep all my passwords was wiped out and a new database created. Fortunately I have several layers of backup so I was able to recover this but anybody else using this should be aware it's not as "perfectly safe" as you thought.
Mike Robertson
In regards to Visual Studio 2003/2005/2008 it is perfectly safe. In regards to other applications, like SplashID and OneNote Mobile, I made no claims. Why would deleting Visual Studio temporary files affect these two applications? Maybe something else happened with these applications? Did you review the script? Did you review the contents of the folders the script would delete before running the script? Did running the script fix the debugging problem with the ASP.NET site?
AMissico
See http://stackoverflow.com/questions/2079029/i-cant-publish-my-website-anymore/2079387#2079387
AMissico