简体   繁体   中英

Visual Studio 2019 Error when debug attach to process

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 (eg 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在此处输入图像描述

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM