1

I'm debugging ASP.NET application

I have two breakpoints in this method:

private void Load()
{
    Stopwatch t = Stopwatch.StartNew(); //breakpoint A
    ...
    LoadStuff(blah); //breakpoint B
}

When I launch LocalIIS(GoogleChrome) in VS, debugger stops at breakpoint B. Previous Call Stack calls Load(). Moreover, I have a breakpoint from where Load() is being called, it doesn't stop there either. Why it skips breakpoint A? Is there a way not to skip it?

Eric Klaus
  • 923
  • 1
  • 9
  • 24

1 Answers1

0

Moreover, I have a breakpoint from where Load() is being called, it doesn't stop there either. Why it skips breakpoint A?

It seems that breakpoint A is invalid on your side due to some reasons. One possibility is that the referenced DLL is out of sync with the version of the code you are debugging or you changed the code and it is inconsistent with the pdb symbol debugging file.

In first of all, please enable Just my code option in case VS ignores breakpoint A.

Solutions

Make sure optimizations are disabled (this is the defaut for the Debug configuration, but they are enabled in Release configuration). Compiler optimizations can mess with the debugger

Besides, try these steps to generate the latest pdb files from server to match your project.

1.clean the solution

2.Tools-->Options-->Debugging-->Symbols First empty the old pdb symbol files and remember to choose "Load all modules,unless excluded" from Microsoft Symbol Servers and NuGet.org.Symbol Server.

3.Load all symbols from servers which provides for debugging project

enter image description here

4.Rebuild your project which generates the DLL that matches your project.

You can refer to this for more information. Hope it could help you.

LoLance
  • 25,666
  • 1
  • 39
  • 73