Coffeehouse Post

Single Post Permalink

View Thread: Visual Studio 2012: SLOW & BUGGY.
  • User profile image

    I have a test application written in C# that runs various tests on out C API. Up until now I have been using VS 2010 and when doing mixed-mode debugging, VS often hangs. If you search around, you can find people running into this issue.

    So I decided to try VS 2012 (with Update 2 installed) and opened the project. It didn't import the Setup project since it seems MS removed the MSI installer and now there is only InstallShield Limited Edition as a setup project type. Well, not a big deal, I can create a new installer later, it is only an internal test application after all.

    So when I try to do mixed debugging, things are even more unstable. Of the 20 or so times I started debugging the application, I believe I was only able to not have VS hang once. When it hangs, I have to end-task the test app, after which VS comes back. But then if I start debugging again, it starts the test app but then says it can't start it. The test app then needs to be end-tasked again. To get VS to be able to debug the app again, I have to exit VS, delete the *.suo file and restart VS. Only then will it successfully start the application, ready to hang as soon as I dare debug unmanaged code.

    Eventually I was able to figure out that if I go to Options > Debugging > General and uncheck "Managed C++ Compatibility Mode", I can successfully debug mixed-mode code. However, my application starts about 5 times slower than with the option enabled (test app takes 32 seconds to start up vs 6 seconds) . I guess it is still better than not being able to debug at all.

    Supposedly when you uncheck the option, it enables a new mixed-mode debugger that is supposedly more stable, and supposedly faster, which it clearly isn't in my case.

    Managed C++ Compatibility Mode enabled means Visual Studio will use the legacy debug engine for mixed mode debugging of Classic Apps (not Windows Store Apps).  In general, the new debug engine tends to be faster and more stable.  The drawback to using it is inspection for C++/CLI variables will be degraded when mixed mode debugging.  This is why Managed C++ Compatibility Mode is checked by default.
    If you find it works better for you and you don't really care about C++/CLI variable inspection, go ahead and uncheck it.  My personal preference for my own debugging is to uncheck it.

    Well I guess the good news is now I can debug mixed-mode. The bad news it is now 5 times slower. You win some, you lose some.