Breakpoints not working in Visual Studio 2008 - visual-studio

When I hit F5, my VS 2008 opens my site in IE and halts. There is no sign in VS that the project is running. It enables the RUN button again even though the site is opened in IE. Hence, my breakpoints are also not working.
This behaviour started happening suddenly..
Any reasons why it happens and resolutions?

Are you building in Debug mode? Release builds don't support breakpoints...

One reason I have personally experienced:
Problem:
Running two separate Solutions in their own instance of Visual Studio 2008
Solution:
I closed both instances of VS, then started only one.
Conclusion 1:
Visual Studio might have a problem when RAM is limited and silently disable breakpoints (fail)
Conclusion 2:
Visual Studio might share some critical resources needed for breakpointing which the first instance holds onto and (again silently) the other instance won't even give you an error.
Lots of bugs and fail in Visual Studio.

This is a bit late, but in case anyone else has this problem, I'll post these two links that helped me when I had a similar problem:
Forum describing similar problems: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/f3fcb4fb-8a08-4fa0-8d58-9ed6f3eb1193
Solution listed in the forum was this patch: http://code.msdn.microsoft.com/KB957912/Release/ProjectReleases.aspx?ReleaseId=1796

Related

What's the reason for error message? I am using VS 2010 professional edition

What's the reason for error message "The snapshot is out of date and cannot be used anymore because type tree has been updated, A new snapshow needs to be acquired"?
This error appeared right after I launched VS2010 and added username/pwd to connect to TFS repository.
I am using VS 2010 professional edition.
It happened to me with VS2012 as well after loading the project without source control binding, a local simple WinForms project. All I needed to do was Clean & Rebuild. After that the problem was solved.
This is a bug in Visual Studio. According to http://connect.microsoft.com/VisualStudio/feedback/details/742959/the-snapshot-is-out-of-date "We've taken a closer look at this problem and it isn't one that we'll be able to solve in the next release of Visual Studio."
They recommend waiting around until the background language parser service is done (or, in other words, don't try to be too productive there partner.) My experience is that closing all documents, cleaning the solution, rebuilding it and then closing and re-opening with a pause after does remove the error.
Until you do something silly, like edit code. Then all bets are off again as to when it reoccurs.
I had a similar issue with VS2012 and after rebuilding the solution twice, I still saw the same error message.
Following an advice from a post from this site, I closed the Designer tab, reopened it from the Solution Explorer, and the problem was resolved.
I got this error too, but after I unload project and reload project, the problem was resolved.
Simply restarting Visual Studio 2012 was a workaround for me, but it kept happening about every hour and having to restart visual studio that often was very annoying.
I also found this post which suggests that the Productivity Power Tools are the problem and to simply turn off the Automatic Brace Completion in Tools->Options->Productivity Power Tools. Since making this change I haven't seen the error message again :)
I'll note though that I am using Visual Studio 2012 and the OP is using Visual Studio 2010, but the Productivity Power Tools are available for VS 2010 too, so this may still fix the problem in VS 2010.
The same issue persists in VS2013, but no amount of Clean/Rebuild or restarting VS will help. The only way I can do a successful publish, is to disable the AutoT4MVC extension.
I got this error too. I closed Visual Studio 2012 and opened it again and the error was gone.
I got this error when I had conflicting class names / namespaces. I was referencing a UserControl from a different DLL in my XAML file which had the same name as my XAML file (class name). Maybe this helps.
I used Visual Studio 2012, and just faced this error on my Windows 8. It seems like Turning off the VM and restarting Visual Studio fixed the issue.
I just got this with VS2010.
I had a form with a user control (UCa) with a user control (UCa) from a different project on it. Made a change to the UCb then flicked to the designer for the form and boom! Snapshot error.
Resolved by a full clean and then rebuilding just the UCb project before building the rest of the project.
I'm using Visual Studio 2012, and I got this error when starting Visual Studio, letting TFS connect to the server, and THEN opening my solution. The fix was simply closing VS and launching the solution directly.
I'll throw my two cents in here as well.
I've tried every combination of Clean, Rebuild, Restart, etc. What I've found is that restarting Visual Studio usually makes the problem go away for at least one Publish. Here's the weird part, though. You can also fix the problem by doing absolutely nothing. If you just let Visual Studio sit for about a minute or two, and then publish, it will usually work just fine. There's some background voodoo going on here, and waiting for it to finish seems to do the trick.
I have a solution with two parts that need published. One is a WCF service application, and the other is the ASP.NET MVC5 website itself. Anytime I publish the services, and then try to publish the site I'll see this error. I can publish the services, restart VS, and then publish the site, OR I can publish the services, go get a drink, and then publish the site. As long as I give VS a chance to "settle" between any kind of rebuild and the publishing of the site, everything seems to work as expected.
Take a walk, come back, problem solved. OR if you don't have the time. Clean, Rebuild, Restart, Publish (lather, rinse, repeat).

Visual studio debug console sometimes stays open and is impossible to close

EDIT #3 : Microsoft has released a 'fix' to this problem which is available here. I haven't had the time to test it, but I those who want to are welcome to leave their feedback here !
Sometimes when I run an application from Visual Studio and it crashes or I stop it using the stop button in the debug menu (Debug->Stop Debugging (Shift-F5)), the console of said application stays open... and never closes. I cannot close it by clicking the 'x' button in the top right corner. I cannot kill the process as it is not even listed in taskmgr.
I have seen this problem documented in different places on the web, but no solution so far.
I am running on windows XP SP3, using visual studio 2008 w/ SP1.
1- What could be causing this ?
2- Is there a fix ?
thanks alot.
JC
EDIT: There is no MyApp.vshost.exe process to close, and closing visual studio does not close the console either. Worse even, if I try to restart my computer windows will hang and never close, I need to do a forced shut down.
EDIT #2 : (from Brad Sullivan, Program Manager - Visual Studio Debugger on March 2nd)
[...] this issue is likely not in Visual Studio since it also occurs in scenarios where Visual Studio is not present. We are in the process of handing over our investigation to the Windows Servicing team.
But for now, removing the KB978037 update and it's related files seems to work.
This is a bug introduced in security update KB978037. Back out this update and you'll be back to normal.
Also see here:
http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/e6d4a4f5-7002-401a-90e1-6174d7f9e3ca
Microsoft has released a 'fix' to this problem which is available here. I haven't had the time to test it, but I those who want to are welcome to leave their feedback here !
There are a couple of things that could be happening here. Try closing down the following process and see which one, if any close down the Console application as well.
The Hosting Process: Typically named YourExecutable.vshost.exe
Visual Studio
If closing the hosting process fixes the issue then one quick work around is to disable the hosting process itself.
Right Click on Project -> Properties -> Debug -> Uncheck the hosting process
If closing down Visual Studio fixes the problem then it's potentially a bug in Visual Studio. Please file a bug on connect.
http://connect.microsoft.com
Visual Studio Debugger Team has already acknowledge this issues on their blog. check the below url for more information.
http://blogs.msdn.com/debugger/archive/2010/03/11/help-my-console-windows-won-t-go-away.aspx

Debugging Classic ASP causes Visual Studio 2008 to crash - how can I fix this?

I'm debugging classic asp code using VS 2008 sp1 on windows 7. Everything works great, I attach to the process and can debug. However, If I stop debugging visual studio will crash.
I read the recycling the app pool would help, but it has not helped me end a debugging session with out crashing. I have hunted through Google and stack overflow for a solution, but so far I've mainly found complaints.
Has anyone figured this out?
Coworker found answer:
http://code.msdn.microsoft.com/KB967631
This QFE fixes three complete separate issues in the VS2008 SP1 Debugger:
Debugger can hang the IDE after setting a breakpoint when working with a large C++ project
Breakpoints do not bind correctly when an MSIL file is built containing .line directives
VS crashes when debugging a classic ASP web and debugging is stopped.
I have had this same problem and the conclusion I came too after scouring the web and reading other user's stories is that VS 2008 has a bug when debugging classic asp! It crashes when you stop debugging. Sort of a time killer to have to restart VS every time you debug.
I have had to resort to using VS2005 to open classic ASP projects and debug them there. If I need to have the ability to work on an app in both 2005 and 2008 I've found that you can have 2 separate solution files, each created by the applicable app (for example I've got appName.sln that I open in VS2008 and then appName2005.sln that I open in VS2005). You will need to create a new solution in VS2005 and add the files, then save that solution with the slightly different .sln filename. This works, it just takes a bit of time to setup.
Supposedly MS is going to resolve this issue in VS2010 but they didn't consider it an important enough problem to issue a patch for VS2008.

Visual Studio 2005 macros won't run

I'm trying to run the Visual Studio 2005 sample macro that attaches the debugger to calc.exe. Neither it nor any other macro seem to do anything when I run them. Calc.exe is running. "Tools->Options->Add-in/Macros Security->Allow macros to run" is checked. The error list shows no errors.
I had this same problem just happen to me. Macros in VS2005 were working fine, and then suddenly stopped one day. I checked permissions, that macros were enabled, etc. I ran the VS2005 setup program and repaired my installation, and none of this fixed it. Finally I uninstalled all the Windows updates that came in the last update cycle. This fixed the problem for me. I uninstalled a bunch at once, so I don't know exactly which update caused the problem, but I know it was at least one of these:
KB2916036
KB2912390
KB2911501
KB2909921
KB2909210
KB2901112
KB2898857
KB2862973
KB2843630
as I uninstalled all of these, and then the macros started working again. All of these Windows updates happened for me on Feb 13, 2014.
Hope this helps someone else.
Mark
P.S. I later discovered it was KB2898857 and you can leave it installed if you edit a few config files, as described here:
http://visualstudioextensions.vlasovstudio.com/2014/02/13/visual-studio-2010-macros-stop-working-after-february-2014-windows-update/#Update
Sounds like your Visual Studio 2005 instance is flaky, or that your Visual Studio 2005 installation is broken. If restarting VS2005 doesn't help, run the VS2005 setup and choose repair. Hope this helps.
Regards,
Sebastiaan
I had this problem too (but in Visual studio 2010).
After multiple attempts to fix it. I discovered it was a stupid problem.
I had another macro in another module that didn't compile (I had semi-colons at the end of lines).
Even though I was running a macro in a different module it didn't seam to matter.
If you are having this problem an easy thing you can check is looking in the error list for any errors in your code. It's very easy to put semi-colons at the end of your lines out of habit.

Browser keep stopping with user breakpoint and opens visual studio 6 in debug mode

Following my last question (see: Problem in hosting ActiveX on Vista (in a Visual Studio 6 C++ application)) I ran into a strange problem. I hope this’ll be a simpler issue to the experts here:
Each time I run certain application like iexplorer or firefox, the Visual Studio 6 suddenly opens up in debug mode with a message “User breakpoint called from code at 0xSOMETHING”.
I can press F5 to continue but the applications run slowly and needless to say I have no wish to debug these applications…
My guess is that when I worked on my VC++ application I placed breakpoints at windows methods like CAxDialogImpl::Create(), AtlAxCreateDialogA() etc’, and for some reason it was kept somewhere.
Of course I now removed all the breakpoints and re-compiled the project but still this keeps happening!
I checked in the tools->options but the “Just-in–time debugging” is not marked.
Any idea?
(I use Visual Studio 6 which I installed on Vista)
Thanks a lot,
Erik
Not sure this helps but anyways:
Try disbaling the default debugger option. (It says Dr. Watson but it depends what you have set as the default debugger)
http://www.bridgetonova.com/2007/09/how-to-disableenable-windows-default.html
Also as per this post Visual Studio 6 is not supported on Vista. Only Visual Basic is.
http://www.itwriting.com/blog/167-visual-studio-6-on-vista.html
You should probably re-ensure yourself that you have removed all calls to DebugBreak() and manual break-points. Also try to ensure that when you recompile you re-register everything to point to the right places (i.e. the activex pointed to by the guid in the registry is actually the latest recompile).

Resources