After using VS2015 snapshot and profiling tools, I can't seem to get the diagnostics tools to work again. Every project, even new ones just say the following
The Diagnostic Tools window does not support the current debugging
configuration.
Tried creating new and different type projects, running as administrator, deleting program data, app data, repairing and re-installing from uninstall.
Anyone experienced this?, shame as they've improved this tool a lot in this version.
So I resolved my issue. The Diagnostic Tools window currently does not support:
Windows Store projects that are using JavaScript
Windows Store projects that are running on a Windows Phone
Debugging with Use Managed or Native Compatibility Mode
In my case I had 'Use Managed Compatibility Mode' enabled. To change this go to the following and uncheck the 'Use Managed Compatibility Mode' or 'Use Managed Native Mode'.
Tools –> Options –> Debugging -> General -> (Un-check) 'Use Managed Compatibility
Mode'
I had the same problem but didn't have checked 'Use Managed Compatibility Mode' option. I had small research and seems like if start visual studio in Administrator mode, I'm able to use diagnostic tools. To start in Visual studio in Administrator mode just right-click on the studio icon and click on Run as administrator.
I encountered this error message in VS2017, but none of the above solutions worked for me. However, I did eventually get it to work.
It seems this tool can actually be attached to any process on the computer's CPU, not just the program being run by VS. So without specifying that you want to run diagnostics on program you're running from VS, it throws this error message.
Initially, I went to Debug > Windows > Show Performance Tools, and when I tried to run my program in the simulator, it would display that error message: "diagnostic tools window does not support the current debugging configuration". I tried going to Debug > Options and turning off the "Use Managed Compatibility Mode" feature, but it was already unchecked (and grayed out), and I tried running VS as an administrator, but it behaved the same.
Eventually, I found a post suggesting "Attaching to Process", which is what ended up working. I went Debug > Attach to Process, which opens up a window that lists a large number of available processes. I couldn't find the simulator that was running my program manually, so I opened my Task Manager, and found it: "qemu-system-x86_64".
I hit "Attach", then went back to Debug > Windows > Show Diagnostic Tools, and I was getting the stream I wanted. From there, I could take snapshots of my memory usage, and I had an easy way to observe the state of my program's memory leak problem during debugging without waiting for actual lag to build.
Cheers.
Running Visual Studio as administrator fixed this for me.
For me it was PostSharp 4.3 (alpha) breaking the "Diagnostics Tools" window.
Thanks for the pointer! For me, it was the other way around, though. "Use Managed Compatibility Mode" was unchecked. Checking it got rid of the error and the debugger started working again.
Related
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?
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
Source:
- https://social.msdn.microsoft.com/Forums/vstudio/en-US/c9936d80-087d-4cad-93bf-ca4873889773/the-debugger-cannot-continue-running-the-process?forum=vsdebug
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"
Solved it by completely uninstalling Visual Studio and ReSharper. I used this tool:
https://github.com/Microsoft/VisualStudioUninstaller
After re-install everything worked again.
In my case detaching from the process and attaching again solved the problem.
I had a same problem but I had a single class library project in a solution so I just rebuild the solution and then it worked.
I have Visual Studio 2015 Community Edition Update 3 running on Windows 7 SP1 64 bit, which I use to develop C# applications.
I love the diagnostic tools during debugging to spot performance problems early on. However, they stopped working for me sometime in the last month or so (possibly related to installing Update 3, although I have no information to back that up). I see the error message "CPU Profiling while debugging is not available on this version of Windows. To see CPU usage details, run the CPU Usage tool without the debugger (Debug -> Performance Profiler...)."
Things I have tried without success:
Completely uninstalling and reinstalling VS.
Performing a repair on my VS installation
Ensuring "Use {Managed,Native} compatability mode" is disabled in debug options.
Enabling the Diagnostics Hub logging info as described in this question. No error messages that I can see appear in the logs.
This still happens even if I create a new WPF project, so I don't believe it has any project-specific cause.
Are there any other things I can try? Obviously they were working before, so I don't believe the error message about my version of Windows being unsupported.
Deleting my solution's .suo (solution options) file fixed the issue. My initial statement of this bug affecting even new projects seems to be wrong. Although, I did do a complete reinstall of VS after doing that test, so it's possible that impacted the outcome.
Full disclosure: I work at Microsoft, specifically on the Diagnostic Tools team.
There are parts of the Diagnostic Tools that won't work on Windows 7, specifically taking a CPU profiling trace while debugging. This is a limitation of the operating system and ETW. If you are just interested in the graphs and debugging events, those should work. You can turn on logging for our tools which might give you some insight into why they are not working:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogLevel
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogDirectory
For LogLevel you can use one of the following strings "All", "Info", "Debug", "Warning", "Error" (In your case I would use All to better see what is happening). As for LogDirectory it is a directory of your choice "C:\Logs". When your done reproing the scenario, close VS to flush the logs and don't forget to delete these keys as the diagnostic tools logging is pretty system intensive.
You should be able to search for "Error ---" in the logs to get an idea of what is happening. We have seen problems with certain VS extensions and custom projects.
Also, feel free to also post the issue at: https://connect.microsoft.com/ Each issue that is received there gets turned into a bug and assigned to the corresponding team.
I had som issues with that a while ago.
1) Check Tools>Options>Debugging>General>Enable Diagnostic Tools while debugging
2) Check Tools>Options>Intellitrace>Enable intellitrace
I had the same issue, although deleting the .suo file did not help, I also repaired Visual Studio 2015 Professional and then it worked. So for future readers, if deleting the .suo does not help, try to also repair Visual Studio and vice versa.
None of the others worked for me. What I had to do was close all Visual Studios and re-opened it and the diagnostic tool worked.
(I deleted the .suo file, made sure all the correct options were enabled, but because I had another Visual Studios session running, none of it worked until I closed all)
I had already another visual studio instance running with diagnostic one. That was the issue for me.
I faced this problem today and it was not easy to find working solution.
This helped to me:
Reinstall Cumulative Servicing Release for Microsoft Visual Studio 2015 Update 3 (KB3165756)
Direct link to download: http://go.microsoft.com/fwlink/?linkid=816878.
After Repair action (I had it installed before, otherwise install) prompted to restart computer, did it and Diagnostic tools worked again.
I had a similar problem with Visual Studio 2015 Pro Update 3 running on Windows 10 Home. The runtime display of memory and cpu usage stopped working. Deleting the .suo file fixed the problem, as indicated by proc-self-map's answer. The .suo file was buried in the .vs hidden directory so I removed the whole .vs subdirectory. Now the runtime display of memory and cpu usage works like a charm again. No reinstall required.
I have VS 2015 Community using C#. I created a WPF application.
When I hit F5 or play Visual Studio starts to debug the application as normal. I even see the Diagnostics showing Memory Usage and CPU (but it locks up, for example at 20 ms and stays there). The problem is that sometimes the application will open and run when debugging, most the time it does not. Important to note that visual studio itself isn't locking up, just the diagnostic tool window.
If I run without debugging the application opens as normal and there are no problems, but if I want debugging the application doesn't even open.
I am sorry I have no errors to show because I get no errors or warnings. It simply just wont open during debugging.
Is there a patch/update I missed or has anyone had this problem before?
I had what sounds like the same problem. I disabled Enable Diagnostic Tools while debugging in Tools → Options → Debugging. In my case it was some kind of conflict with Symantec (per the event log). Not ideal but being able to debug is better than having diagnostics.
UPDATE
I looked up the help desk ticket I filed for this incident and it was not the event log, I remembered that incorrectly. What was happening was that the edpa.exe process (a Symantec process which is controlled by group policy at my office) was thrashing the processor whenever I would debug. The fix/workaround is the same. I have since got a new PC and I do not experience the problem.
Have you tried restarting Visual Studio / PC or re-building the solution?
It may help.
There should be no conflict with Symantec NIS (current version 22.6.0.142). It (your question submittal plus the accepted answer) sounds more like an available memory issue; my NIS reports high memory usage when I start up VS, so I sometimes (not always) have Diagnostics failing to start up, but debugging always would continue. Perhaps adding more physical memory is the solution for you; but for now, turning off Enable Diagnostic Tools While Debugging is just a bandaid.
I am in charge of testing VS 2015 and how it works with our current applications for my employer. We currently use VS 2013 for everything we have, so I know there are no issues there. The problem I am having is that it appears the vshost.exe isn't terminating correctly or something. I have not narrowed down the exact issue but so far that is what I believe.
Here is how I get my error:
Run my app in debug
Open a few windows
Hit the "Stop Debug" button (the little red square)
Clean Solution
Rebuild Solution
After my rebuild I get the following errors in the EXE:
Error Could not copy "obj\Debug\APP.exe" to "..\..\bin\APP.exe". Exceeded retry count of 10. Failed.
Error Unable to copy file "obj\Debug\APP.exe" to "..\..\bin\CRM.exe". The process cannot access the file '..\..\bin\APP.exe' because it is being used by another process.
If I open the Task Manager and manually end the vshost.exe process I can successfully rebuild again, no issues. If I take the same steps, however, I am no longer able to build.
I tested these steps in 2013 and did not have an issue.
Also note that disabling the "Enable the Visual Studio hosting process" does alleviate the issue, however I do not want to disable this option.
Has anyone else had this issue? I know we are still early in release. Any suggestions/solutions to try? Is it possible there is something wrong in our code (which I highly doubt since I would then get the error in 2013, most likely).
Thanks for any help I receive!
EDIT: This is a WPF application written in .Net 4.0 using C#. Also, I have verified that the issue also occurs if I exit the application normally (IE I open a window then close it with the shutdown mode on LastWindowClosed)
SECOND EDIT: This is a new issue that presented itself in Visual Studio 2015 with the addition of the new live diagnostic tools.
I have found that if I have the "Enable Diagnostic Tools while debugging" option enabled in the debug settings I get this error. If I disable this option, the error goes away. I am not sure if this is a bug in Visual Studio but I would assume so, unless I need to do something else to shut them down properly. If anyone has comments or concerns, feel free to leave a note.
Probably late for the original question (and I see that he had a workaround), but as per MSDN, VSHOST.exe is only an enabler for improving Debug performance or facilitates scenarios such as partial trust debugging. If you do not need that support or can bear the cost of starting a process and attaching the debugger on each debug session, go ahead and disable the hosting process from project designer -> Debug -> Clear the box "Enable Visual Studio hosting process"
When I hover my mouse over a variable when debugging a C# app in Visual Studio nothing popups. I expect to see the value of the variable (aka datatips). I'm running Visual Studio 2012 Ultimate (trial edition) on Windows 7 64bit. Does anyone know what may prevent them from showing?
Things I've tried to no avail:
- Reinstall VS
- Search for an enable/disable setting but there doesn't seem to be one
I can see the datatips correctly with the same C# project on Windows 8/64bit with the same version of Visual Studio.
THis helped me: you need to open in VS Tools | Options | Debugger | General and enable the flag [Use Managed Compatibility Mode].
Before running the application check you are running it in Debug mode. If set to Release mode change it to Debug and then run. The debugger will then provide the data-tips.
I have found this solutions:
reinstall Visual Studio as advised here, but you have already tried it
Open your VS->Tools->Import and Export Settings Wizard->Reset all settings->No, just reset settings, overwriting my current settings-> Choose a Default Collection of Settings from MSDN Forum: Debugging - hover watch has stopped working
maybe you have Release build configuration
set Code Optimization property to Disabled under Project property windows
as advised in similar question on SO
I had this problem so I deleted all the *.suo and *.user files I could find in the solution directory and that seemed to fix it.
I had this same problem. My project had somehow gone into Release mode, so I changed it back to Debug mode via Build|Configuration Manager and it was working again, the datatips reappeared.
I realize this is an older post. But I have the exact problem in Visual Studio 2019. The funny thing is that datatips are not showing on my external screens. But if I drag Visual Studio to my laptop screen, it shows without problems. Dragging it back to one of the two external screens and it won't show.
I also have a problem that the Project Properties and Team/Source Control Explorer does not show anything but white content until I switch to another tab and then back. Then it loads. I have tried enabling GPU support in Windows, but nothing.
Has anyone had the same experience?
I will of course try all of the suggestions for the datatips thing, as that's really decreasing my effectivity.
The same happened to me but only with C#, active mode administered compatibility (Managed Compatibility Mode) and it worked well, then I wanted to modify the code while had debugged and came out a motioning message
compatibility mode administered is not supports edit and continue
Then turn it off again, under native support is (Use the legacy C# and VB expression evaluators) enable this option and you can see the value of objects and edit code debugging.
Try deleting the .vs directory and restarting visual studio.
This 3 combinations solved it for me.
- Make sure you are in Debug mode
- Uncheck/Disable Use the legacy C#,VB.NET evaluator (Tools->Options->Debugger)
- Make sure Enable Just My Code is checked.
Using remote debugging on another machine makes it more challenging.
This thread talks about RPC Server being unavailable when using "Use Managed Compatibility Mode", which makes remote debug impossible with Managed Compatibility Mode
Remote Debugging not working. "Unable to attach to process. The RPC server is not available."
Native compatibility had the same effect.
It was only "Use legacy C# and VB expression evaluators" that allowed hover over variables AND remote debugging in my case.
I deleted the project and re-cloned it from git, then it worked. None of the other solutions worked for me.
I ended up with resetting VS Settings to make this work:
Ok, I'm not exactly sure why my Visual Studio 2019 v16.8.2 was not showing the data tips popup whenever I hover over the variables when I'm debugging. FYI, I am using a project that was created on another machine with the same version of Visual Studio. I got it fixed by doing the following steps.
Load up the project and set it to release build.
Visit Tools -> Options -> Use Managed Compatibility Code, set it to enabled. Close the Options menu.
Remove any breakpoints in your code.
Run the project in Release build mode, instead of Debug mode.
Let the program run for 5 seconds and then click red square that STOPS the debugging running program.
Open up the Options again and change the 'Use Managed Compatibility Code' back to disabled(uncheck it). Close Options.
Add some breakpoints and set the run mode back to 'Debug' mode and click Play to debug the program as per normal usage.
Doing these steps in this order solved the problem for me. I'm not exactly sure which steps solve the problem but somehow in doing the preceding list of things, it's now fixed. A reinstall of VS 2019 didn't help.
UPDATE: After going back to my project and attempting to debug, it appears it's back to not working again. I tried the above steps and that only fixes the problem for the first iteration of the loop I'm working in. It appears when the code is working, then the next iteration through the loop and when it comes to my breakpoints, they are no longer showing the little popup window that allows you to inspect the variable data. So doing the above-mentioned steps only solves the problem for the first time the breakpoints are hit.
P.S. I'm using two instances of Visual Studio 2019 and am recreating one of my older apps so that it is up to date. I'm not sure if this has anything to do with the datatip's not showing up when mouse hovers over the variables or not.
I updated the package of RestSharp, and my problem solved. Packages with warning icon on it can cause this problem.
drop this into .csproj of your project (first propertygroup).
<DebugEngines>{351668CC-8477-4fbf-BFE3-5F1006E4DB1F}</DebugEngines>
It's basically as adding for your project manually that it uses compatibility managed mode, since in vs2022 this option does not exist in options.
For me, this worked on Microsoft Visual Studio Community 2017, Version 15.9.9:
If you are facing this issue simply uninstall the current version and reinstall VS. After installing and running debugging mode first time, please choose "Disable Just My code and Continue" selection,it should work.(as shown in the attached screen shot).
If you do not want to uninstall and then re-install visual studio,then try these settings on the existing VS installation:
Go to: Options => Import and Export Settings ==>Reset All Settings==>No Just reset settings,overwrite my current settings =>Finish
after this simply start debugging and choose "Disable Just My code and Continue" option.
3.If you are still having problem,please also make sure by going to project =>properties ==> Configurations that you have configurations set to debug(sometimes configurations are set to release)
Go to Tools=>options =>Debugging ==> General ==> select Suppress JIT optimization on module load