Reputation: 2795
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:
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:
What could be the problem? Sorry for my English.
Upvotes: 10
Views: 64750
Reputation: 1
This can happen if you haven't set the current project as the startup project. In the solution explorer navigate to your project right click and select set as startup project.
Upvotes: 0
Reputation: 351
If the library happens to be c++ with a C# consumer project actually doing the calling into it, you need to go to Properties -> Enable Native Debugging in the consumer project, and make sure this box is checked.
Upvotes: 0
Reputation: 2843
First try rebuilding your project by right mouse click the project > Rebuild If that doesn't work, try a clean of the project (right mouse click on the project > clean)
I had similar issue and I did the following: Debug=>Options=>General => Remove the check mark for "Enable Just My Code" This worked for my vs
Upvotes: 2
Reputation: 2517
In my case the project under which the debug breakpoints were not getting hit was also referenced by another solution which was at the time running. When I stopped that solution the breakpoints started hitting.
Upvotes: 0
Reputation: 4113
If you're doing multiple startup projects, make sure you have all your services your want to debug set to Start
Upvotes: 1
Reputation: 101
I am using a solution with several projects (Visual Studio 2015). I tried several approach. This one worked for me. In my case, the problem was solved when I realized that one of the projects was being defined with another URL in: Project properties - Web - Servers - Project Url. After changing to use the same URL as the other projects, the problem was solved.
Upvotes: 0
Reputation: 101
I am using a solution with several projects (Visual Studio 2015). In my case, the problem was solved when I realized that one of the projects was being defined with another URL in: Project properties - Web - Servers - Project Url. After changing to use the same URL as the other projects, the problem was solved.
Upvotes: 0
Reputation: 39
Require source files to exactly match the original version
This has to be unchecked.
Upvotes: 3
Reputation: 2795
Fixing:
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:
Advanced settings of build:
Checked for Microsoft Visual Studio Enterprise 2015 and Microsoft Visual Studio Professional 2017.
Upvotes: 24
Reputation: 333
I had similar issue and I did the following simply:
Go to Debug
=> Options
=> General
=> Remove the check mark for "Enable Just My Code
"
This worked for me.
Upvotes: 20
Reputation: 1459
As a future reference, the same issue can happen when you have the same assembly both in GAC and bin\Debug folder. Just deleting the assembly from the GAC and it works again.
Upvotes: 1
Reputation: 613
Another reason this can happen is that if you are sharing multiple projects between solutions and you have set up custom build configurations then simply changing from release to debug on the toolbar (or other shortcuts) can mess up the active build configuration and create all sorts of random consequences.
Make sure that Solution > Properties > Active Config is what you expect ('Mixed' is usually bad) and use Solution > Configuration Manager if in doubt.
I forgot again and the tactics popular on the intertubes did not, of course, work so this is partly a note to self...
Upvotes: 5
Reputation: 41
Try adding or updating your .csproj
file with the tag <DebugType>full</DebugType>
inside <PropertyGroup>
. This solved my problem.
Upvotes: 0