Set breakpoint on constructor

I am trying to set a breakpoint for the constructor for a class in an external assembly using Debug , New Breakpoint , Break at function .

I tried using both .ctor and ctor as the function name, but it does not work

  • System.Web.Mvc.ViewResult..ctor
  • System.Web.Mvc.ViewResult.ctor
  • System.Web.Mvc.ViewResult.ViewResult

If the class has several controllers, then this will work;

  • System.Web.Mvc.HttpUnauthorizedResult.HttpUnauthorizedResult

In some cases, Visual Studio shows the constructor name as a class name, for example, with HttpUnauthorizedResult , but in other cases it shows the constructor name as .ctor , for example, with System.Uri .


Breakpoints - System.Uri

Breakpoints

+5
source share

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


All Articles