0

I've been using VS for years and the problem I'm having is a first and it's only for one (so far) small project. I've already looked at this:

When debugging ASP.NET MVC app, breakpoints are not hit

My problem isn't that I can't hit breakpoints at all. Rather, I can hit breakpoints at the startup of debugging. For example, breakpoint in the middle of Register (I'm staring at a breakpoint on config.EnableCors() right now) and it stops there just fine. Put breakpoints in a controller and I get the standard solid red ball to show a working breakpoint. But the program stubbornly refuses to hit breakpoints once out of startup.

This is a webapi and I'm already going nuts unable to debug a simple function. Any suggestions? I tried anything that might have helped in the other question to no avail. I'm running VS 2017.

Argle
  • 198
  • 1
  • 1
  • 12
  • And you've confirmed the controller code is running and returning the expected results? – ChiefTwoPencils Aug 18 '21 at 23:55
  • Yes, they are operating. Client is picking up replies and exceptions without issue. I can alter the results and the alterations also arrive at the client. – Argle Aug 18 '21 at 23:59
  • I'll add that I tried putting Debug.Break() in one spot in the code, presumably a guaranteed halt, but it does nothing. – Argle Aug 19 '21 at 00:15
  • 1
    Found the problem: I had set the project to use Local IIS and the root pointed at the right local url. This is correct and works. For some bizarre reason, VS lost my setting and it reverted to IIS Express, which is why I could hit breakpoints at takeoff. I also didn't notice the rollback. – Argle Aug 19 '21 at 00:39

0 Answers0