1
votes

I'm trying to debug an application but I'm constantly getting the following error message: "The breakpoint will not currently be hit. No symbols have been loaded for this document." when I attach it to the desired process.

After digging in a bit, I realized that many pdb files are not getting created when I build the solution although the dll's are available.

enter image description here

5

5 Answers

5
votes

I had a similar problem from a web api code I got from another developer. Turned out Just My Code was set to true. You should see in your output window a line that says symbols were not loaded. To turn Just My Code off go to tools then options, debugging, general and untick Enable Just My Code

3
votes

I don't know why the .pdb's aren't being created when you build the solution, but a couple of places to check. Go into the Projects properties, Compile settings. Under Advanced Compile Options make sure that Generate debug info isn't set to None. Check for both Debug and Release configurations as well as any configurations you might have created. Also verify that the build output path is pointing to where you want it to be. You also could try searching your drive to see if the .pdb's are being created in another location (unlikely but worth a try?)

1
votes

I had the same problem. Unchecking "Native Code" (in Project --> Properties --> tab Web --> section Debuggers --> Native Code) works for me.

1
votes

Another gotcha, I've run into this issue when projects in my solution were set to release configuration (I'd set it that way previously to diagnose a publish issue). Setting back to debug brings back the breakpoints.

0
votes

I had the same problem and I solved this by disable "Export at background".