Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
984 views
in Technique[技术] by (71.8m points)

Visual Studio 2017 Debug Error: To prevent an unsafe abort when evaluating the function *.toString all threads were allowed to run

I updated Visual Studio 2017 to version 15.8.2.

After this update, I started to encounter these errors while debugging:

Error Image 1

Error Image 2

Error Image 3

Here are the error messages:

Visual Studio Debug Error: To prevent an unsafe abort when evaluating the function *.toString all threads were allowed to run. This may have changed the state of the process and any breakpoints encountered have been skipped.

This error shows up quite often, and after a while Visual Studio crashes.

I tried to uninstall and install Visual Studio again and reset preferences, but I had no luck.

When I disable the option: "Enable property evaluation and other implicit function calls", I get the same error when I try to evaluate some properties by moving the mouse over them. It's quite difficult to debug without it, and I had no problems before this build.

The problem is the same with C# and Visual Basic (.NET).

Is there any fix for this problem? My team has no problem working on the same project with Visual Studio 2017 version 15.7.4

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I add the same error message but with a different function name :

To prevent an unsafe abort when evaluating the function 'Microsoft.VisualStudio.Debugger.Runtime.Tracing.Refresh' all threads were allowed to run. This may have changed the state of the process and any breakpoints encountered have been skipped.


This is how I got rid of this pesky bug :
In Visual Studio 2017 go to
Tools → Options → Debugging → General → Check 'Use Managed Compatibility Mode'
thanks to this article :
https://www.codeart.dk/blog/2018/9/vs2017-debugger-timeout/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...