Search code examples
c#unit-testingweb-config

VS2015 The breakpoint will not currently be hit. No symbols have been loaded for this document


I have solution with 3 projects. Project one - Library. Project two - Service (asmx). Project three - Test. In my service I have two config transform: PRODUCTION and TEST. They are equals, but name of databases is different. My solution:

Solution

If I Debug Test with PRODUCTION.config then all right - my breakpoints is active. If I Debug Test with TEST.config then bad. I get this:

The breakpoint will not currently be hit

What could be the problem? Sorry for my English.


Solution

  • Fixing:

    1. Right mouse click your project
    2. Select Properties
    3. Select the Build tab
    4. Make sure Define DEBUG constant and Define TRACE constant are checked
    5. Click the Advanced button at the bottom of the Build tabpage
    6. Make sure that Debug Info: is set to Full
    7. Click OK and save changes
    8. Clean solution and rebuild the project

    Link to source Fixing “The breakpoint will not currently be hit. No symbols have been loaded for this document.”.

    (step 6 generates the .pdb files, these are the debugging symbols)


    For more information see next screenshots. Build settings:

    Build options

    Advanced settings of build:

    Advanced build settings

    Checked for Microsoft Visual Studio Enterprise 2015 and Microsoft Visual Studio Professional 2017.