8997

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

Question:

I found myself in this same problem than <a href="https://stackoverflow.com/questions/36204009/disable-break-mode-page-in-vs2015" rel="nofollow">here</a>, 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 <a href="https://stackoverflow.com/questions/36204009/disable-break-mode-page-in-vs2015" rel="nofollow">this list</a> 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

Answer1:

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.

Answer2:

I've never worked with Autocad but I've made a few plugins for Solidworks and for Creo Parametrics. Here what I usually do when my breakpoint is not working:

<ol><li>

Make sure that on build tab of project settings

<ul><li>DEBUG constant is on </li> <li>Debug info set to full</li> <li>Optimized code is off </li> </ul></li> <li>

To the code in question add System.Diagnostics.Trace.WriteLine("something unique"); and run it without visual studio attached to make sure your code is actually being called. Check with <a href="https://technet.microsoft.com/en-us/sysinternals/debugview.aspx" rel="nofollow">DebugView utility</a> from sys internals.

</li> <li>Make sure right copy of your dll is loaded : <ol><li>Run your solution from visual studio as you usually do </li> <li>Check if you are attached to the right process. </li> <li>Do actions in Autocad that trigger your code.</li> <li>Click on Break All button in Debug toolbar in VS</li> <li>Open Debug->Windows->Modules window and make sure that your dll is present in the list, path is correct and there's pdb file for your dll right next to it. </li> </ol></li> <li>Add calls to System.Diagnostics.Debugger.Launch(); and System.Diagnostics.Debugger.Break(); to your code.</li> </ol>

Hope this helps, let me know if you need clarifications for any of the steps.

Answer3:

Restarting visual studio solve this for me.

Answer4:

I have this problem on my Visual Studio 2017 15.8.6. Maybe my code setting is "Allow unsafe code", but it has the same error code. The solution is click Tool > Options > Debugging > General > Use Managed Compatibility Mode and activate it. I found the solution from <a href="https://forums.autodesk.com/t5/revit-api-forum/use-managed-compatibility-mode-or-enable-native-code-debugging/td-p/6868592" rel="nofollow">this forum</a>.

<a href="https://i.stack.imgur.com/KWNda.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/KWNda.png" data-original="https://i.stack.imgur.com/KWNda.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Recommend

  • How to detect Chromium OS using JavaScript?
  • Convert value into a URL friendly format - Unicode decomposition ähhh
  • Handling partial/incomplete dates in .NET
  • What are equivalents to R's “phyper” function in Python?
  • How to publish StringBuffer safely?
  • Passing pointer to pointer in Perl 6 NativeCall
  • How to distinguish Unload Event triggered by Refresh or Window Close?
  • Touchenter and touchleave events support
  • Does Dapper work on Mono?
  • Normalize a table with tightly coupled data
  • how to execute shell script in the same process in python [closed]
  • Python multiprocessing using a lock or manager list for Pool workers accessing a global list variabl
  • How to stop the python turtle from drawing
  • “*Certificate not found* (from client)” when calling Web Service that requires signing
  • Save cropped image from ng-src
  • Scrapy and submitting a javascript form
  • Why doesn't this class property serialize?
  • iframe cross-domain access
  • How to change footer of a particular page with a particular header title in TCPDF
  • .NET COM assembly interacting with Excel via BackgroundWorker
  • R SparkR - equivalent to melt function
  • Speed up Date#parse & Date#strptime in Ruby, more elegant way or best practice?
  • Cycle R,G,B vales as HUE?
  • Using django-multiupload within a ModelForm
  • integrity constraint violation: NOT NULL check constraint
  • Issues with converting data into a matrix after running lapply()
  • Load php page results into div with ajax with link?
  • Arraylist of strings into one comma separated string
  • Query takes almost two seconds but matches only two rows - why isn't the index helping?
  • How to make Rss News Reader application in android …? [closed]
  • Stop an element moving with padding on hover
  • how do i compare two rows and store the similarities of the two rows in another column
  • Android: Unable to detect vertical plane
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • How to handle div that is created dynamically in a table
  • Debug `Unexpected end of JSON input Error` on content script
  • Apple Mach-O Linker error (“duplicate symbol”)
  • Sign a Pdf using custom digital signature in Java
  • Angular FormGroup won't update it's value immediately after patchValue or setValue
  • Firebase: How to read from external DB?