Visual Studio 2015 - "Unable to step. The operation could not be completed. A retry should be performed"
Solution 1
Solved it by completely uninstalling Visual Studio and ReSharper. I used this tool:
https://github.com/Microsoft/VisualStudioUninstaller
After re-install everything worked again.
Solution 2
I've also ran into this issue before in Visual Studio 2015 Update 3 on Windows 7 SP1 (64-bit).
Try disabling the Visual Studio hosting process.
Project Properties > Debug > uncheck "Enable the Visual Studio hosting process"
Also, are you running out of memory?
Are you debugging an ASP.NET website?
A known issue with the Visual Studio debugger causing this problem. There is a race condition that happens when all of the following are true:
- Script debugging is enabled in IE
- User is debugging IE and another process
- The other process stops (hits breakpoint, step operation completes, stops at an exception, etc) at a moment when IE is not running script code
- IE starts running script code at roughly the same moment that the user hits F10/F5 in Visual Studio. The most likely reason for this to happen is that the code from ‘setTimeout’ is run – there could be other reasons as well.
Workaround
If you hit this problem, you can try detaching and reattaching the debugger.
-or-
This problem happens when debugging ASP.NET and when script debugging is enabled in IE. If you disable script debugging in IE, or toggle it on and off when switching between debugger server-side and client-side problems, you would be able to work around the issue.
-or-
- If your web application is using setTimeout, you may be able to avoid or at least reduce the problem by doing something to ensure that script runs less often. This could mean increasing the timeout value, or this could mean adding conditions around when setTimeout is used.
Sources:
- https://blogs.msdn.microsoft.com/rakkimk/2008/06/07/getting-unable-to-step-the-operation-could-not-be-completed-a-retry-should-be-performed-while-debugging-in-visual-studio/
- https://blogs.iis.net/rakkimk/getting-quot-unable-to-step-the-operation-could-not-be-completed-a-retry-should-be-performed-quot-while-debugging-in-visual-studio
- https://social.msdn.microsoft.com/Forums/vstudio/en-US/2320a943-d52d-437a-abec-6f1e9f929b52/debugger-error-unable-to-step-the-operation-could-not-be-completed?forum=vsdebug
Are you debugging a Universal Windows App?
If so, a work-around could be to reinstall "Tools for Universal Windows Appps Development" as follows:
· If the “Tools for Universal Windows Apps Development” are still installed:
Go to Programs and Features, select Visual Studio 2105, click Change.
In Visual Studio setup, click Modify.
Deselect the feature “Tools for Universal Windows App Development”
Select “Tools for Universal Windows App Development” again, and click Update.
· If you have already uninstalled the “Tools for Universal Windows Apps Development”:
· Reinstall “Tools for Universal Windows App Development”
· Or, take the following steps to reinstall the JavaScript project system and language service:
§ Download the installer for your edition of Visual Studio, e.g., vs_community.exe.
§ Open a CMD window, and run the following command: vs_community.exe /modify /installselectableitems JavaScript_Hidden /passive
Solution 3
In Visual Studio 2015, 2017 and 2019 you can do that:
Go to Tools -> Options -> Debugging -> General
Turn off
"Break all processes when one process breaks"
Solution 4
In my case detaching from the process and attaching again solved the problem.
Related videos on Youtube
Ogglas
My biggest interest in life is technology, primarily computers. It started out with a general computer interest and the need to know how and why something works. This interest has continued to grow but instead of dissecting computer hardware and removing viruses from friends computers all day long my focus has changed to IT security and programming. The programming language that I prefer is C#. On my spare time I like to do small (and large) technology projects. This can be everything from creating an RFID-reader or 3D printer using an Arduino to participating in vulnerability bounty programs. Another big interest is also my entrepreneurial side. I like to see something grow and instead of just seeing obstacles I try to see possibilities.
Updated on June 04, 2022Comments
-
Ogglas almost 2 years
When debugging I get the following error:
Unable to step. The operation could not be completed. A retry should be performed
After clicking OK, the dialog returns:
The debugger cannot continue running the process. The operation could not be completed. A retry should be performed.
The solution is set to "Debug" and "Any CPU". After restarting the application I can step through the code but it takes 5-10 seconds to step on something that normally goes instant. However CPU, RAM and HDD is operating normally and not peaking. Has anyone else experienced this?
-
Lasse V. Karlsen over 7 yearsIs your programming hooking into anything in Windows itself? Like creating keyboard hooks, window subclassing hooks, etc.?
-
Ogglas over 7 yearsThe application is talking with a rabbitmq.com server that runs locally but otherwise no. It is a simple console application that reads email using imap. @LasseV.Karlsen
-
-
crokusek almost 7 yearsfyi, Just started getting this error while debugging a WCF site in Chrome. Under the Advanced tab, the options "disable script debugging" IE & other, are both checked.
-
Rami A. almost 7 years@crokusek, try disabling the Visual Studio hosting process. See the top of my updated answer.
-
Hugo over 6 yearsThis did not help me, I still have the problem. Sadly. I'm Debugging a Console App, that consume some WCF Service.
-
Hugo over 6 yearsThis did not help me, I still have the problem. Sadly. I'm Debugging a Console App, that consume some WCF Service