More in this section
Forums / Developing with Sitefinity / Breakpoint not hit in MVC controller

Breakpoint not hit in MVC controller

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
1 posts, 0 answered
  1. kavede
    kavede avatar
    0 posts
    27 Oct 2016
    21 Feb 2017
    Link to this post

    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...
1 posts, 0 answered