-3

I have used visual studio 2019 (C#) to develop an add-in for Revit software. But when I debug "attach to process". My Visual studio return a error "Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing)." with exception "An unhandled exception of type 'System.ExecutionEngineException' occurred in Unknown Module.". Does anybody have a solution to fix my error. Thank you! note: I have used plugin "Add-in manager" to debug my code enter image description here

MauNguyenVan
  • 187
  • 2
  • 8
  • As the error message says: you need to select the suitable debug engine when attaching (selection is available above the list of running processes). – Klaus Gütter Aug 29 '20 at 07:53

3 Answers3

0

The message says ", but no code is currently executing that is supported by the selected debug engine..."

There are two ways to debug revit addins with visual studio, either load the assembly at runtime (with invokemethod). Or start a new session of Revit.exe with the debug tools.

  • Nether ways run on my computer. I use Add- in Manager to debug attach process then visual studio return a error above. – MauNguyenVan Aug 30 '20 at 05:29
0

If you install some nuget packages with x64, you should change your project to Debug/x64 while install some x86 nuget packages, you should change it to Debug/x86.

First, try to disable the option Enable Just My Code under Tools-->Options-->Debugging-->General

Then, open your project in VS,right-click on the project Properties-->Debug--> check Enable Native Code Debugging option.

After that, rebuild your project and then run the program first on the current system. With it, you can use Attach to Process to debug this process.

Since I am not familiar with revit, you could try these suggestions to troubleshoot the issue.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
-2

I fixed my error. I Uninstalled some add-in which I installed before. That fine

MauNguyenVan
  • 187
  • 2
  • 8