locked
F11 (Step into) stopped functioning RRS feed

  • Question

  • What problems might cause VS2008 IDE to stop in its ability to step into code?

    I have a breakpoint set on a call to a method in a native code. When pressing F11 I only get Disassembly code.  If I put a breakpoint in the code where I wish to "step into"  from the caller, the breakpoint is hit.  I just can't get to the line where the breakpoint was hit with a breakpoint on the calling line.

    Hope that makes sense.


    I ensured that I was selecting a Debug build.  I deleted all breakpoints and placed a new one.  I even rebuilt the solution from the 3 projects that make up the solution.  If the project files are corrupted, I am going to try and rebuild the projects from source and see where that leads.
    Jer 29:11
    Wednesday, November 25, 2009 9:41 PM

All replies

  • Hi,

    Thanks for reporting this issue.

    What's type of project you are debugging?
    How did you call native method?
    Can you provide a step by step for us to reproduce the issue?

    If you call the native method from a managed project, please make sure the unmanaged code debugging is enabled in the project properties.

    In Visual Studio menu Debug | Windows | Modules window, please check if the native DLL has been loaded correctly and its symbol status.

    It is better that you can have a try to reproduce the issue from scratch by creating a new project.

     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com



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

  • What's type of project you are debugging?
    Native Win32 app with a breakpoint at a call into a function that exists in a mixed-mode DLL.  The DLL exports three functions.

    Can you provide a step by step for us to reproduce the issue?
    The project was working fine until I specified a folder in the Win32 app which directs where to look for additional include files, and where to look for import libs.  That is the point where things didn't work anymore.


    If you call the native method from a managed project, please make sure the unmanaged code debugging is enabled in the project properties.
    I call a function in a mixed-mode DLL from a native app, not the other way.


    In Visual Studio menu Debug | Windows | Modules window, please check if the native DLL has been loaded correctly and its symbol status.

    Status on both DLL's in solution show Symbols loaded

    It is better that you can have a try to reproduce the issue from scratch by creating a new project.
     

    I can send this project to someone who may wish to look at it.

    Jer 29:11
    Monday, November 30, 2009 4:29 PM
  • I created a new solution of the three projects (all created from scratch) and get the same result.

    Jer 29:11
    Wednesday, December 2, 2009 2:54 AM
  • When in disassembly mode, can  you step into your function call? Meaning, F11 into the call "foo" instruction? And does this land in your other DLL? Or does it go somewhere else first?
    Thursday, December 3, 2009 1:47 AM
  • Sorry for my delay.

    Can you first check if the following commands can fix the problem?

    devenv /resetsettings

    This command restore all your settings from your options page.

    If it doesn't work, you can send your projects to my email "hongyes @ microsoft.com (please remove spaces)"

    Have a nice day,
     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 3, 2009 5:38 PM
  • When in disassembly mode, can  you step into your function call? Meaning, F11 into the call "foo" instruction? And does this land in your other DLL? Or does it go somewhere else first?

    Hi,

    It won't even go to disassembly!  Just steps over.

    Jer 29:11
    Thursday, December 3, 2009 7:09 PM
  • Sorry for my delay.

    Can you first check if the following commands can fix the problem?

    devenv /resetsettings

    This command restore all your settings from your options page.

    If it doesn't work, you can send your projects to my email "hongyes @ microsoft.com (please remove spaces)"

    Have a nice day,
     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    It did not fix the issue.  Sent a project to address provided.

    Jer 29:11
    Thursday, December 3, 2009 7:18 PM
  • I sent a zip file that contains the subject project to the e-mail address you gave.
    Jer 29:11
    Tuesday, December 8, 2009 4:57 PM
  • Sorry for my delayed reply.

    Found the cause. It is because you havn't set the debugger type to Mixed when you want to debug native code to call managed code.

    The setting is at start up project properties / Debugging / Debugger Type / Mixed.

     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, December 8, 2009 4:58 PM
  • Sorry for my delayed reply.

    Found the cause. It is because you havn't set the debugger type to Mixed when you want to debug native code to call managed code.

    The setting is at start up project properties / Debugging / Debugger Type / Mixed.

     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


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

    In the start up project, search for the line hCameraViewer = manWindowHandler();  Please place a breakpoint on that line.  When the breakpoint is hit, pressing F11 goes to a line in minternal.h which is:

    if (!AppDomain::CurrentDomain->IsDefaultAppDomain() && IsUsingOpenMP())

    The expected line should be where the function manWindowHandler is defined.

    Did you try the application that I sent?


    Jer 29:11
    Tuesday, December 8, 2009 7:04 PM
  • I tried it but sorry that I didn't notice the issue. I did see the debugger enter the minternal.h file, but I thought it is because I disabled the Just My Code setting. However after I checked it, the debugger still thinks msvcm90d.dll module as User Code. That's why the debugger step into its code.

    I set a breakpoint at beginning of the manWindowHandler function, when I press F5, I can hit the breakpoint correctly. Can you check if breakpoint works?

    Currently, I am trying to figure out to let your project not link to debugcrt library. It can let debugger take msvcm90d.dll as non-user code.

    I will let you know once I find the solution.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 10, 2009 4:16 PM
  • I set a breakpoint at beginning of the manWindowHandler function, when I press F5, I can hit the breakpoint correctly. Can you check if breakpoint works?

    Getting to the breakpoint works fine.  The issue is stepping into the function itself.  That continues to be a problem.  Looking at the code you will see this is not a complex solution of projects.  I think there are issues with VS2008 that may not obvious.  Some of the technique used to create this was referenced by the All-In-One Framework

    Thanks.

    Jer 29:11
    Thursday, December 10, 2009 4:25 PM
  • Thanks for your feedback and glad to know that you are using All-In-One Framework.

    I still can't step into the target function. I am not sure if it is a bug or by design. Here are what I found: 

    I tested the project in both Debug and Release mode. VS loads different assembly when debugging in Debug and Release mode. However both of them are considered as User Code.

    User code is determined by PDB file and optimization. So the only way to prevent it is to delete the symbols. I also tried to delete the source file, it doesn't work. Debugger will still step into the disassembly code.

    You can submit a bug at http://connect.microsoft.com to get more information from product group.

    Have a nice day.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Samantha Chan Wednesday, December 16, 2009 10:07 PM
    • Unmarked as answer by alleyes Tuesday, July 20, 2010 6:35 PM
    Friday, December 11, 2009 10:10 AM
  • You can submit a bug at http://connect.microsoft.com to get more information from product group.

    The issue was posted to the product group and is referenced here



    Jer 29:11
    Friday, December 11, 2009 5:25 PM
  • Thanks for your feedback and glad to know that you are using All-In-One Framework.

    I still can't step into the target function. I am not sure if it is a bug or by design. Here are what I found: 

    I tested the project in both Debug and Release mode. VS loads different assembly when debugging in Debug and Release mode. However both of them are considered as User Code.

    User code is determined by PDB file and optimization. So the only way to prevent it is to delete the symbols. I also tried to delete the source file, it doesn't work. Debugger will still step into the disassembly code.

    You can submit a bug at http://connect.microsoft.com to get more information from product group.

    Have a nice day.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    This also happens on VS2010 and the connect group appear to be unwilling to help.  There has been no status for more than 7 months!
    Tuesday, July 20, 2010 6:57 PM
  • I encountered this issue in VS2010.  It was caused by an inadvertent change to the unmanaged DLL's project settings for "/debug (generate debug info)".  It was turned off so no debug information was generated.  Directions for changing this setting are here: http://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx.
    Friday, November 21, 2014 3:24 PM