Can I set a breakpoint in a Razor template?

Can I set a breakpoint in a Razor template? It can be argued that the template should be so “dumb" or "minimal" in it that you never have to debug them, which can really be. However, I don’t think there is anything in Razor to prevent the abuse of templates in any way, so you may need to reload the template in the end.

+4
source share
2 answers

You can really set a breakpoint in the Razor template. And regardless of the "dullness" of your gaze, it is inevitable, if useful, to fill out a view with values ​​that you can debug as needed. Another reason to love you is ASP.NET MVC.

+3
source

Yes it is possible.

As long as the debugger is connected to the website, this will work.

+1
source

Source: https://habr.com/ru/post/1393045/


All Articles