none
How To Fix Debugger - F11 Does Not Work!

    Question

  • I cannot debug my code. The debugger will not step thru the code line by line when I hit F11. Sometimes I hit F11 and it continues, sometimes it goes to the next break point, it skips over conditional statements and loops even though it executes all of the code inside the loop. I cannot work this way.

    PLEASE tell me how to fix this problem. This is VS 2008 trying to step thru C# code on a normal install of an XP Pro machine, VS 2008 version 9 SP1.

    I've tried tweaking all of the tools options settings but nothing seems to have any effect on this problem. I have tried importing all settings from a co-worker whose debugger works correctly, but when I open my code I still have the same probolem, it won't step. Other co-workers have this same problem, while some work correctly. I have reinstalled XP Pro and VS 2008 from scratch and still have the same problem.

    PLEASE tell me how to fix this problem. PLEASE Microsoft...... I am not the only one having this problem. Friends at another company have this same problem with their VS 2005 and VS 2008. Please help.....

    SC
    Codo Ergo Sum
    Tuesday, August 04, 2009 2:28 PM

Answers

  • Thanks for your valuable feedback.

    Please go to Tools->Options...->Debugging->General, and uncheck "Enable Just My Code (Managed only)" option and check "Suppress JIT optimization on module load (managed only)".

    If you want to debug into the .NET Framework source code, please:
     1. Turn OFF the "Enable Just My Code" option
     2. Turn ON the "Enable Source Server Support" option.
    For the deailed steps to configure Visual Studio to debug into the Framework source code, please refer to this article.

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Roahn Luo Tuesday, August 11, 2009 6:40 AM
    Thursday, August 06, 2009 3:00 AM

All replies

  • Hello,

    I'm sorry that the step over (F11) does not work for your C# project.
    By default, if we want to debug code "line by line", we could press F10 (step over).

    Since it is happened on a particular project, I suggest you follow the steps below:
     1. Close the instances of Visual Studio
     2. Find the folder where our project located
     3. Delete the hidden .suo file which is near the .sln file
     4. Click .sln file to open our project again
     5. Start debugging.

    Will you please have a try and tell me the result?
    Best regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Wednesday, August 05, 2009 10:32 AM
  • Hello,

    I'm sorry that the step over (F11) does not work for your C# project.
    By default, if we want to debug code "line by line", we could press F10 (step over).

    Since it is happened on a particular project, I suggest you follow the steps below:
     1. Close the instances of Visual Studio
     2. Find the folder where our project located
     3. Delete the hidden .suo file which is near the .sln file
     4. Click .sln file to open our project again
     5. Start debugging.

    Will you please have a try and tell me the result?
    Best regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    I don't understand why you say the default is F10. I don't want to "step OVER" I want to "step INTO" and the default key for that is F11, not F10. I need the F11 key to function correctly. But it does not step into, most of the time it "continues".  Sometimes hitting F10 causes it to continue, so F10 does not work correctly either.

    This is not happening on a particular project, I did not say that. It happens on ALL projects. Even after wiping the hard drive and reinstalling everything from scratch, it still happens. Even after I installed the fix from Microsoft for this specific problem, it still does not step line by line correctly.

    Codo Ergo Sum
    Wednesday, August 05, 2009 1:06 PM
  • Thanks for your valuable feedback.

    Please go to Tools->Options...->Debugging->General, and uncheck "Enable Just My Code (Managed only)" option and check "Suppress JIT optimization on module load (managed only)".

    If you want to debug into the .NET Framework source code, please:
     1. Turn OFF the "Enable Just My Code" option
     2. Turn ON the "Enable Source Server Support" option.
    For the deailed steps to configure Visual Studio to debug into the Framework source code, please refer to this article.

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Roahn Luo Tuesday, August 11, 2009 6:40 AM
    Thursday, August 06, 2009 3:00 AM
  • Thanks for your valuable feedback.

    Please go to Tools->Options...->Debugging->General, and uncheck "Enable Just My Code (Managed only)" option and check "Suppress JIT optimization on module load (managed only)".

    If you want to debug into the .NET Framework source code, please:
     1. Turn OFF the "Enable Just My Code" option
     2. Turn ON the "Enable Source Server Support" option.
    For the deailed steps to configure Visual Studio to debug into the Framework source code, please refer to this article.

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!

    Tried this, it helped some, but there are still times when I hit F11 and the debugger will "Continue" instead of "Step Into" and I do not understand why it does that. Are there other Options settings that might change this behaviour?

    Sometimes I hit F11 and the code will skip over several statements (assigning values to variables, skip over If conditions that are true, skip over entire Do loops) and continue to the next break point. Sometimes it will skip over 3 or 4 breakpoints, and the break points are not inside loops or conditionals. I am trying to detect a pattern in what it skips over and what it stops on, but I'm not seeing anything consistent. The essence is that F11 should step one line at a time every time, but more than half the time it will simply skip several lines or just continue running the program. The settings above that you told me to change did make a difference, but it still does not step line by line the way it should. I would like it to step line by line when I hit F11, just like VB6 did with the F8 key.

    Thanks for trying to help.
    SC
    Codo Ergo Sum
    Tuesday, August 11, 2009 1:23 PM
  • I am using windows 7 , visual studio 2005 which I have pinned in the taskbar.

    F10 works properly, F11 did not work.

    Solution

    I rightclicked the (visualstudio shortcut in the taskbar) and then run as administrator.

    f11 now works

     

    Saturday, October 23, 2010 3:22 PM