I suggest you ...

Make Debugging faster

It takes too long to begin debugging an application. It also takes too much time stepping through code in debug mode.

1,802 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Doug Turnure - msftDoug Turnure - msft shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    26 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Iulian RaduIulian Radu commented  ·   ·  Flag as inappropriate

        It may be the case here since I'm using a library that's throwing a std::invalid_argument exception when trying to make an invalid cast. I am probably catching a couple of tens of millions of these.

        Thank you for the suggestion. I'll test is more thoroughly and try to get rid of the exception.

      • Steve Carroll [msft]Steve Carroll [msft] commented  ·   ·  Flag as inappropriate

        Iulian, in many cases, when the application runs much slower under the debugger it is because the application is throwing many many exceptions. This turns out to be the cause in about half of all reported cases. Is it possible that is the case here? If you aren't throwing a bunch of exceptions, we'll need to get a trace. mail scarroll at Microsoft.

      • Iulian RaduIulian Radu commented  ·   ·  Flag as inappropriate

        I am trying to debug a 64 bit application. When ran outside the debugger it finishes in 22 seconds using all 4 CPU cores. When ran with the debugger attached it's running about 100 times slower. Instead of the usual 100% CPU consumption it has less than 1% CPU consumption and the msvsmon.exe application is eating a full CPU.

        Note that this is without any recompilation. The same program runs 100 times (not percent) faster when ran with the debugger detached.

        If I debug the 32 bit version of the same program it works reasonably fast. I can't make an apples to apples comparison though since the app uses about 16 GB of RAM and the 32 bit version is a simplified one, so it fits in RAM.

      • Dave NovakDave Novak commented  ·   ·  Flag as inappropriate

        @mjohn -- you're probably right as I've only worked with native C++ in VS-2012. But I do give them credit for making improvements with 'native', as this was much slower prior to Update 1 of VS-2012.

      • ssjxssjx commented  ·   ·  Flag as inappropriate

        After microsoft use .net framework, every software is very slow in my computer. sqlserver manage studio is slow, microsoft dynamic crm is very slow to startup, visual studio is very very slow. my copmuter often shoutdown by itself because the cpu's temperature is too height.

        @Dave Novak, you use native C++, not manage code, native is more faster.

      • Anonymous commented  ·   ·  Flag as inappropriate

        It's April 2013 and it seems like debugging a native Windows Phone 8 app on a HTC 8S is really slow. Takes like 3 seconds to step in one line. The emulator is lightning fast compared to this but I also have some issues with deployment on an ARM device compared to X86 so I can't use that for proper debugging anymore :|.

      • Dave NovakDave Novak commented  ·   ·  Flag as inappropriate

        For me, debugging native C++, recent product updates to VS-2012 have significantly improved performance. Removing my votes for this now.

      • Anonymous commented  ·   ·  Flag as inappropriate

        I am using VS2010 (V10.0.40219.1 Sp1 Rel).

        I am having issue:
        debugging is too slow (30+ seconds to step through onne line ) when "enable property evaluation and other implicit function calls"..

        please help me

      • KarbonKarbon commented  ·   ·  Flag as inappropriate

        I have the same problem, but switched to Forefox debugging everything works fast!
        I wonder what they use in MS ...

      • VS DebuggerVS Debugger commented  ·   ·  Flag as inappropriate

        Hi Philippe, sorry to hear you're experiencing such a slowdown (and we appreciate the other feedback as well). Can you send me a mail so I can get more detail on your project? mariabl at microsoft. Looking forward to hearing from you.

      • PhilippePhilippe commented  ·   ·  Flag as inappropriate

        I just noticed that under Visual Studio 2012 Release Candidate, debugging native code in a mixed-mode DLL is really slow. I have a class without ref modifier and as soon as I step into that function, debugging is order of magnitude slower and as soon as I am again in managed code, the debugger is fast again.

        There is a factor of more that 10x slowdown. It happen weitheir on the main executable properties (C# application) I enable the native debugger or not.

        Normally a few updates are done per seconds. When debugging that particular code, it take almost 5 seconds for each step. I have tried to close Intellitrace Windows and it does not help much. I have no breakpoint and only common debugging Windows opened (thread, stack, auto, local, watches).

        There are no valid reason that the debugger would be much slower when debugging native code in a mixed-mode application that it is with managed code.

      • PhilippePhilippe commented  ·   ·  Flag as inappropriate

        Avoid slowing down C++ code too much while debugging (when using STL containers). Also improving Edit and continue to works in more cases (C++/CLI, C# lamba...) and permit edition even if Edit and continue cannot compile them would make debugging experience faster.

        And effectively, improving start time or stepping speed won't hurt even though in my case, it is generally not much a problem.

      • Dave NovakDave Novak commented  ·   ·  Flag as inappropriate

        Steve, I sent you an email to (scarroll, not scarrolll). If you didn't get it, please contact me at dave.novak at xaviant dot com. Thanks.

      • Dave NovakDave Novak commented  ·   ·  Flag as inappropriate

        I'm seeing this somewhat in both, though I think it's worse under VS-11, which is where I've been doing all of my debugging as of late. First breakpoint generally takes close to 30 seconds to respond after it hits and, from there, about 5-10 seconds to F10 between lines. Sometimes though it's much worse. It's very reproducible.

        I never had these problems using Visual Studio 2008.

      • Steve Carroll [msft]Steve Carroll [msft] commented  ·   ·  Flag as inappropriate

        Dave, can you let us know if you are seeing this in Vs2010 or Dev11? we'd love to get a repro as that behavior is not typical or expected.

      • Dave NovakDave Novak commented  ·   ·  Flag as inappropriate

        I don't know what's going on here, but stepping through C++ code in the debugger is HORRIBLY SLOW, especially after the breakpoint first hits. I've seen it take anywhere from a few seconds to close to a minute to F10 step to the next line. And I have a 64-bit Windows 7 machine with 16GB memory, an SSD, and an i7 3.8 GHz processor.

        The debugger is PIG DOG SLOW and needs to be fixed!

      • QwertieQwertie commented  ·   ·  Flag as inappropriate

        Interesting, I just noticed that single-stepping though a C# program here at home (VS2010E) is quite fast, but at work it's much slower, at often one second per single step (but I'm on VS2008--we CAN'T upgrade because MSFT dropped WinCE support, although I am talking about the speed of local desktop debugging, not device debugging).

        I think the main reason that debugging was slow in VS2008 is that when I single-step, all the editor tabs changed to show a "lock" icon--I can see each tab redrawing itself one-by-one--and then the "lock" icon disappears again--from each tab one-by-one. Is this fixed now, or is it just that my home project is configured differently?

      ← Previous 1

      Feedback and Knowledge Base