Tips for speeding up debugging (stepping through code)?

I've got one particular large C++ project that, in VC 2005, when stepping through code in the debugger, it takes approximately 2 seconds for each hit of the F10 key (i.e. each line of code) to be executed. I've tried many things to attempt to speed it up: disable intellisense, renaming feacp.dll, removing all additional output windows, watch, breakpoints, etc, removing navigation bar from text editor window, disabling anti-virus on the machine, closing all other apps. It's always the same speed.

Running on a dual P4 2.8 gig with 1 gig of memory, and hyperthreading enabled.

Are there any other tips for speeding up debugging in the project I've tried looking at filemon to see if there's any excessive file access, but nothing obvious shows up.



Answer this question

Tips for speeding up debugging (stepping through code)?

  • Stanislav Yudin

    Yes this is slow. But so slow as you describe is strange. Native or managed code
    I usually use breakpoints or Ctrl+F10 (run to cursor position).



  • Wendy7

    Also, do you have any breakpoints of the form "break on function" etc that would have to do searching to find where to break If you do, replacing them with specific line #'s might help.

  • akilan

    It's all native code, MFC and ATL projects.

    Strange, I don't know whether it is global - did you notice a difference between VS 2003 and VS 2005, or is it from VC 6 to VC 2005 that's a big speed difference. This particular project is coming from VC 6.0.


  • old ocker

    Did any of the above suggestions help speeding up debugging

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Cindy Winegarden - VFP MVP

    Hi Ted, have you tried to debug in disassembly Is that as slow as debugging the source code

    BTW: the following link is about the setting of symbol file server, but i think that is not likely to be the cause of delay (it will slow the loading time, not the debug time)

    http://msdn2.microsoft.com/en-us/library/b8ttk8zy.aspx


  • ramsarvan

    Thanks, but rebasing made no difference (I used the rebase program from the Platform SDK).

    One time, just once, I had it working so it was fast, but when I restarted, it was slow again. I'm trying to remember what I did that allowed it to be fast.


  • Nitwit

    Thanks Ben for the suggestion, it's a good one I've used many times in the past, but in this case I have no breakpoints set at all, except the one to get me started (which I remove immediately after starting the step through the code)

    OShah, I do see some access to a local symbol server when I use filemon, but I'm not sure if there's any way to configure this or whether it is causing the problem,

    Ted.


  • Joe Sladek

    Hi Boris,

    I'm having a bit of a tough time coming up with a suitable bug for presentation on the product feedback center.  I cannot include any code nor any modules on the site as they are confidential.  Should I just say, debugging is slow for this particular project, or would there be any chance of working offline with someone  

    Thanks

    Ted.


  • Stayron

    Nothing unfortunately. I've got no breakpoints set at all, I've got nothing unusual in the process.

    On my modules list I do have several DLLs that have the message "the module did not load at the default load address". I've also got approximately 21 modules that have symbols that are loaded.

    vbvan, the answer to your question is that yes, when stepping through the disassembly, I get a 2 second delay for each line of assembly.


  • Christian Malatesti

    Ted,

    Did you get a chance to log a bug We'd love to investigate this because it does sound pretty fishy.



  • TWorman

    Symbol server problems

  • yoshistr

    Rebased DLLs... Interesting. I wonder what happens when you set those DLLs at a different address (using the /BASE option)

    The problem is, I've got a similar program with lots of DLLs that get rebased (on a computer half as fast as yours) and I don't have anywhere near a 2 second delay. Even if rebasing alleviates the problem, I still recommend initiating a bug report.



  • Gaurav Singh

    That is probably something the owners would for sure be interested to take a look. Could you please log an issue at http://lab.msdn.microsoft.com/productfeedback/default.aspx. Please post the link here and I will make sure to send an email to the owners.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Amelia

    I'll get one up soon,

    Thanks

    Ted.


  • Tips for speeding up debugging (stepping through code)?