none
modules window is empty when debugging and the breakpoint will not currently be hit. No symbols have beenloaded for this document RRS feed

  • Question

  • I have recently upgraded a solution from 3.5 framework to 4.6.1 framework using Visual studio 2017. When in Debug mode, when I set a breakpoint at the the Page_load for a page I am trying to check, the breakpoint goes from solid red to yellow circle, with warning message 'The breakpoint will not currently be hit. No symbols have been loaded for this document'.  The modules window is empty. I have had no luck with any of the solutions I've read so far.

    The page opens and displays fine just the breakpoint isn't hit and I need to step through the code to investigate an issue.

    I've tried several suggestions including:

    cleaned and rebuilt the solution and projects

    Removed the pdb files and repeated step above 

    Changed settings in tools, options, Debugging - disabled the Enable just my Code, Enabled the .NET framework source stepping, enabled Load dll exports (Native only)

    also in Symbols - after enabling the NET framework source stepping the cache was set up and symbols loaded, and after that clicked the Microsoft symbol servers checkbox but neither of these made any difference.

    When I last ran the debug and I checked the cache location on my machine all the microsoft symbols loaded but the solution dll all failed to load.

    I've checked the project property pages and the debuggers is set to asp.net, the target framework is .NET Framework 4.6.1

    Before the upgrade the debugging process was working fine.

    Can you let me know what else I can try or is there another solution for this?

    Thanks

    Friday, September 28, 2018 10:32 AM

All replies

  • If the code is in your current project and you are debugging the current project then the breakpoint will be hit. Most of the settings you mentioned won't have an impact on your project-level code. They only apply to dependencies.

    There could be any # of things going wrong.

    1) The project isn't actually building so you're getting a compiler error but you checked the option to run anyway so you're running an older version. Seems unlikely given the steps you indicated.

    2) Somehow the solution configuration (which is what you are referring to Debug mode) is not using a debug build of the project. Right click the solution and go to Configuration Manager. Verify your project is being built and it is building the Debug configuration for the Debug configuration of your project.

    3) This seems to be a web app so verify the URL that is loading. Go to your project's properties. Then go to Web (or Debug) and verify the start URL is the project and not something else.

    4) Your page is actually part of a larger app that isn't running under the debugger (a plugin) and so the debug process is different.

    5) The file you're modifying isn't the file that is actually in the project. Close the file in the editor and then open it again from Solution Explorer just to make sure.

    Note that for a web app the debugger won't load the code until the page is actually hit so at least on initial start this is expected behavior. Put a Debug.Assert call or Debugger.Break call in your page load method and then rerun your app. If the debugger doesn't kick in then it isn't running the code you are modifying.


    Michael Taylor http://www.michaeltaylorp3.net

    Friday, September 28, 2018 2:41 PM
    Moderator