Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2013 the breakpoint will not currently be hit. no symbols have been loaded for this document

VS2013, windows 8.1, windows phone 8 c# app Breakpoints not working and i got the breakpoint will not currently be hit. no symbols have been loaded for this document error what i need to do?

Image

like image 715
Dmitriy Skogorev Avatar asked Sep 19 '14 09:09

Dmitriy Skogorev


3 Answers

I struggled forever trying to fix this. Finally this is what did it for me.

Select Debug -> Options -> Debugging -> General

Tick Enable .NET Framework source stepping.

(This may be all you need to do but if you are like me, you also have to do the ones stated below. The below solution will also fix errors where your project is loading old assemblies/.pdb files despite rebuilding and cleaning.)

Select Tools -> Options -> Projects and Solutions -> Build and Run,

Untick Only Build startup projects and dependencies on Run,

Select Always Build from the On Run, when project are out of date dropdown.

like image 87
Anselm Avatar answered Sep 20 '22 20:09

Anselm


You should build your project, if it is build be sure that you attach to right process ! If you are sure that this 2 are okay, clean the solution and rebuild again.

like image 28
mybirthname Avatar answered Sep 24 '22 20:09

mybirthname


Usually this means that any of your assemblies has changed but was not not re-built, or to be more precise the Debug-Information-File (PDB) is not recent. Therefor the debugger does not know the right source-text and therefor cannot step into. Rebuilt the assemblies and attach it to the right process.

Also you may take into consideration that assemblies built for .NET 3.5 downwards may not be processed together with assemblies for .NET 4.0 upwards, you cannot debug both types at the same time.

EDIT: To ensure what I mentioned before check which type of assembly the debug-info is generated for. When attaching your assembly to an existing process press the select-button behind "attach to". There you can select the right type if not automatically done.

like image 44
MakePeaceGreatAgain Avatar answered Sep 23 '22 20:09

MakePeaceGreatAgain