Breakpoint not hit in MVC controller

Posted by Community Admin on 04-Aug-2018 11:29

Breakpoint not hit in MVC controller

All Replies

Posted by Community Admin on 21-Feb-2017 00:00

Hello,

I want to debug code from my MVC controller class.
I've put a breakpoint on the first line of code in the Index action method, which is also the only action method in my controller.

I launch sitefinity by pressing F5, then sitefinity is starting up in Chrome, and eventually it shows my website. VS is halting on the breakpoint, since my MVC widget is part of the page template used on all pages. So far so good.

I then navigate to another page in my website, which uses the same page layout and thus also contains the widget. The page is loaded without hitting the breakpoint in my MVC controller class.
If I go back to my index page, then the breakpoint is hit again.

Why is that?
I've read many topics here and on other blogs, but can't find a reason why or how to get it working.
I've disabled Output Cache and Client Cache in the settings from Sitefinity, I've cleared my local browser cache. All without success.

The page does use the MVC widget, If I change the output of the widget, I can see the change on the page. How can I make Visual Studio hit my breakpoint while loading the page?

Puzzled here...

This thread is closed