VS2012 Breakpoints are not getting hit

后端 未结 24 1677
小鲜肉
小鲜肉 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:16

    Some ideas.

    1. Make sure it's a debug build and not release
    2. Turn off optimizations in your project properties if they are on
    3. Try inserting Debugger.Break() in your code instead of a breakpoint in VS
    4. Make sure breakpoints are enabled (Debug->Windows->Breakpoints toolbar), and breakpoint symbol should be solid
    5. Execute your application. Load Debug->Window->Modules window. Check your assembly to see if symbols are loaded. It may give a relevant status message if not.

    Have you been adjusting the date on your computer at all? This can really screw up a build process. If so, delete all your obj/bin folders manually and recompile.

提交回复
热议问题