none
VS 2010 Dll, The breakpoint will not currently be hit. No symbols have been loaded for this document

    Question

  • This is one of THE most maddening things I've ever encountered in over a decade of VS use.  I have a DLL project, .Net 4.0, set to the Startup Project, and the Project properties page starts an external .EXE.  When I hit F5, my solid red breakpoint in the DLL code goes to a hollow red circle with the maddening triangle and message when hovered over:  "The breakpoint will not currently be hit.  No symbols have been loaded for this document.

    If I try and just run the .EXE manually and use the 'Attach to Process' method, sometimes it has worked, but most times not, and for the life of me I can't figure out why in the world it's doing this.  Based on some suggestions from other posts, here are answers to possible questions/suggestions:

    1)  My .PDB's are correctly built and copied.  Their timestamps match the DLL timestamps and exist in both 'bin\Debug' and the folder from which the external EXE is launched.

    2)  All project build configurations are set to DEBUG

    3)  When running, and using the 'Attach To Process' method, I've used the 'Select...' button to set the Code Type to Automatic, Managed (v4.0) code, etc.  None of these work

    4)  Some have suggested looking at the 'Debug | Windows | Modules' menu item...I do not have the 'Modules' option under the 'Debug | Windows' menu item.  This is VS2010 Ultimate.

    5)  I've right-clicked on solution, selected 'Clean Solution' and then rebuilt.

    I've scoured the internet many times for this problem and it seems that there is not any one solution, most of the posts seem to be hit or miss with what is suggested.  Would love for someone from MS to document the specific steps to take in order to ensure that symbols will be loaded, I'm tired of reading posts that say "have you tried ... <fill in one of many guesses>? ... that worked for me".

    Like I said, I love VS but this situation drives me absolutely insane because I can't tell what is causing it when it does happen, what clears it up when it doesn't, and in the meantime I'm losing valuable debug time.  HEEEEELLLLLPPPPPP!!!!!!!!!

     


    • Edited by ps0118mj Friday, January 13, 2012 11:22 PM
    Friday, January 13, 2012 11:21 PM

Answers

  • Please refer to 4) above...as I stated I do not have the 'Modules' option when debugging.

    However, based on another post, I was able to get the shortcut to this window (Ctrl-D + M), and saw that my DLL was not even loaded.  After doing some research, I realized that it was not loaded based on the scenario I was processing, and when I figured out which scenario actually loaded the DLL, my symbols were loaded and breakpoint was hit.

    • Edited by ps0118mj Monday, January 16, 2012 2:44 AM
    • Marked as answer by ps0118mj Monday, January 16, 2012 2:44 AM
    Monday, January 16, 2012 2:24 AM

All replies

  • Hi,

    You should definitely check the Modules window under Debug/Windows. This window is only available when debugging is started. 

    Please review the following thread for more tips and let me know does it work for you:

    http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/00cce3a6-8702-4795-a11e-cd20a5a591e2

     

    Best,


    Martin Kulov
    www.kulov.net

    Microsoft Regional Director
    VS ALM MVP, MCT, MCSD, MCPD, INETA Speaker
    Sunday, January 15, 2012 9:15 AM
  • Please refer to 4) above...as I stated I do not have the 'Modules' option when debugging.

    However, based on another post, I was able to get the shortcut to this window (Ctrl-D + M), and saw that my DLL was not even loaded.  After doing some research, I realized that it was not loaded based on the scenario I was processing, and when I figured out which scenario actually loaded the DLL, my symbols were loaded and breakpoint was hit.

    • Edited by ps0118mj Monday, January 16, 2012 2:44 AM
    • Marked as answer by ps0118mj Monday, January 16, 2012 2:44 AM
    Monday, January 16, 2012 2:24 AM
  • I'm glad to hear that you solved this question.

    Have a good day!


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 16, 2012 5:30 AM
    Moderator