Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging issue in Visual Studio 2017

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.

like image 790
S. Deshmukh Avatar asked Dec 29 '17 09:12

S. Deshmukh


People also ask

How do I fix the Debug executable in Visual Studio?

Just go to File->Open->Project/Solution and browse to the .exe file. Like you would if it was a . sln file. Visual Studio will then open that EXE as a project.

How do you fix Visual Studio Cannot start debugging because the Debug target is missing?

Go to Build > Configuration Manager, and make sure the project has selected the Build. Then rebuild the project and see. If the answer is the right solution, please click "Accept Answer" and kindly upvote it.

Why is my VS Code debugger not working?

Debugger not working Look at the debugger console for any error messages displayed. Look at the Debugger Tools console output for any errors. Remember to re-start VS Code once done (this won't be necessary in a future release). Solution: Clear all expressions from the debugger Watch window and start debugging again.

How do I Debug a DLL in Visual Studio 2017?

Right-click the DLL project and choose Set as Startup Project. Make sure the Solutions Configuration field is set to Debug. Press F5, click the green Start arrow, or select Debug > Start Debugging.


1 Answers

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.

like image 198
John Dyer Avatar answered Oct 17 '22 04:10

John Dyer