VS2012 Breakpoints are not getting hit

后端 未结 24 1715
小鲜肉
小鲜肉 2020-12-13 12:44

I have a class that looks like this:

public class MyService
{
    private MyService(){}
    public static string GetStuff()
    {
        var stuffDid = new          


        
24条回答
  •  星月不相逢
    2020-12-13 13:20

    Just make sure that you have build your assembly with the debugger symbols.

    This option has to be filled with "full":

    Right-Click your project containing your code file with the break points not getting hit. Choose "Properties".

    After project properties have been opened, choose "Build" tab. Watch out for the "Advanced..."-Buttom at the bottom of the tab page. (Within the "Output"-Group")

    Click this button and choose "full" for the "Debug info" property. This should be a reason for breakpoints not getting hit. Visual studio uses the symbols saved in the pdb-files to find the exact position of the break point. If these files are not created, no breakpoints are hit. Maybe you disabled the creation of these files in order to tidy up your project file structure. This was a situation I recognized that I need these files.

提交回复
热议问题