12

When starting my project in debug mode, I get the following error and have to stop debugging:

Error screen in Visual Studio while debug start

This is the error message:

Evaluating the function 'Microsoft.VisualStudio.Debugger.Runtime.Tracing.Refresh' timed out and needed to be aborted in an unsafe way. This may have currupted the target process If the Problem happens regularly, consider disabling the Tools > Options, setting Debugging > General > Enable property evaluation and other implicit function calls, or change the code to disable evaluation of this method. See help for information on doing this.

Lauren Rutledge
  • 1,195
  • 5
  • 18
  • 27
S. Deshmukh
  • 314
  • 4
  • 19
  • 4
    Paste the error instead of screenshot in your question. – Raptor Dec 29 '17 at 09:39
  • https://developercommunity.visualstudio.com/content/problem/92154/evaluating-the-function-timed-out-and-needed-to-be.html – Hans Passant Dec 29 '17 at 14:01
  • 2
    I have been having this error regularly since a few weeks now too. Maybe VS 15.2 ? – JBSnorro Jan 15 '18 at 20:02
  • Our VS is 15.3 but still their is issue with updated version. – S. Deshmukh Jan 22 '18 at 10:10
  • I am having the same issue but only with one project. Not sure what is causing this. Would really appreciate any hints – gyurisc May 11 '18 at 10:09
  • We got the same error in one of our users (using the same machine along with 5 devs). Only he gets this error, the rest of us it is normal. Weird – JobaDiniz Nov 01 '18 at 12:45
  • Related post - [Visual Studio 2017 Debug Error: To prevent an unsafe abort when evaluating the function *.toString all threads where allowed to run](https://stackoverflow.com/q/52187355/465053) – RBT Nov 18 '19 at 10:51

2 Answers2

2

I was also seeing the error message in this question with Visual Studio 2017 Version 15.7.0. The original poster doesn't say what studio version was involved.

I found this limited post on another site: https://www.devexpress.com/Support/Center/Question/Details/T581002/evaluation-of-service-timed-out-and-needed-to-be-aborted-in-an-unsafe-way

That post was regarding version 17.2.3 but there's not details other than an upgrade seemed to have "fixed" the issue and sadly the upgrade version isn't supplied.

I've upgraded from 15.7.0 to 15.8.1 and the situation is different. First the error message has changed and second, for me, I can now continue to debug and run my program. Previously the state of the system was messed up and I couldn't continue running / debugging, my program was in a strange hung state.

New error message text: 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.

John Dyer
  • 2,316
  • 1
  • 21
  • 27
  • The same problem happens on my machine, using VS 15.8.4. It seems to happen only when the client is calling server WebAPI functions in parallel from multiple threads at the same time (because the clients submitted multiple requests at the same time). As far as I remember, these problems started with Visual Studio 2017. Previously was more stable. – cskwg Oct 03 '18 at 09:38
0

Got the same problem with VS2019 (Version 16.7.6). My Problem was that the Constructor Call implicitely called a getter which was dependend on another property, which wasnt created at that time, I think. Changed the code, problem was solved.

To Wa
  • 43
  • 7