The application is in break mode. your app has entered a break state,

user3223834 picture user3223834 · May 30, 2017 · Viewed 15.6k times · Source

I found myself in this same problem than here, I'm using windows forms in a dll (this is for an Autocad plug-in) and I cannot debug my code because I receive "The application is in break mode. your app has entered a break state, but no code is currently executing that is supported by the selected debug engine". I have tried every recommendation in this list and none worked for me. One odd thing was that I can break in the constructor but the events that use a controller/config object get that page.

Any ideas why this may be happening?

thanks in advance

Answer

Hoodlum picture Hoodlum · Oct 30, 2017

In my case, I was receiving this same message when calling an MVC API endpoint, and it was also throwing a stack overflow exception. The cause was an object property in an external dll which was written with a backing field. The set accessor of the property was accidentally written to set the property and not the backing field which caused an infinite loop, hence the stack overflow exception. Note the missing underscore in the setter.

private string _Prefix;
public string Prefix
{
   get { return _Prefix; }
   set { Prefix = value; }
}

Though your issue may not be exactly as mine, something similar is occurring in an external dll.