Has anyone experienced VS2008 (inc SP1) ignoring or losing breakpoints by accident?

Since the upgrade to 2008, I and a lot of people here have noticed that randomly VS will no longer enter code or jump over breakpoints. It got to the stage where debugging becomes real work. We are working with Service Pack 1 (SP1) but also noticed an issue with the 2008 base.

In the question about Robert's question: We host WCF and Remoting services inside Windows services. Basically, calls from clients (typically windows exe) end up with a stream of the service itself and our code (as opposed to a remote or WCF infrastructure). Once in our code breakpoints have this behavior.

Most of the debugging we're doing here is in the service code, so ATTACH processes invaluable information and sometimes it's impossible to get to the state other than attaching to processes after they start. This happens to developers both with extensions like resharper and those running vanilla VS.

Looking at google doesn't provide much help.

Is anyone else experiencing this?

Regards, Preet


Spudlo's answer worked very well for us. Thank. Download the fix from MSDN

+1


source to share


4 answers


Here is a blog post with a link to the patch.



+2


source


Yes, when I forgot to switch from RELEASE to DEBUG.;)



Allways drives me crazy before I realize my stupidity.

+2


source


Some things to check:

  • Are your PDBs in the same directory as your DLL applications?
  • Are they created by Debug?
  • Also is there a source path that is different?
  • Do the Dlls load when connected (check the output console)?
  • Does the breakpoint appear as an empty (unfilled) environment in VS? If so, hover your cursor over the breakpoint and it will tell you why it can't set the breakpoint.

Perhaps as a job you can start the service from VS. If you changed your application to a console application and added a main method that calls the OnStart method (just like a Windows service). You can still install the app as a Windows service and also run it directly from VS:

public static void Main(string[] args)
{
    if (Environment.UserInteractive)
    {
        Console.WriteLine("Starting service...");
        Service1 svc = new Service1();
        svc.OnStart(args);
        Console.WriteLine("Started");
        Console.WriteLine("");
        Console.WriteLine("Press any key to stop");
        Console.Read();
        Console.WriteLine("Stopping...");
        svc.OnStop();
        Console.WriteLine("Stopped, Press any key to exit");
        Console.Read();
    }
    else
    {
        ServiceBase.Run(new Service1());
    }
}

      

+2


source


We've seen issues with BP Service Pack 1 (SP1). We reported this to Conenct ( https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=363453 ) and MS has since sent us a DLL to fix it (seems to work). I expect MS to release a patch soon.

Since you have problems without SP1 this may or may not help

+1


source







All Articles