VS 2017 - Very slow (laggy) when debugging - visual-studio

When I debug my solution, vs 2017 is very laggy and slow it's like it has to operate something heavy in the background.
So it stops "responding" every 5 seconds for 2 seconds, which is very annoying.
Any suggestions?
EDIT (tried suggestions):
Browser Link is turned off
Stopped customer feedback

After some additional investigation I found this thread
Unchecking Enable Diagnostic Tools while debugging in Tools → Options → Debugging → General did the trick!
Unchecking Enable JavaScript debugging for ASP.NET in
Tools → Options → Debugging → General
makes a huge difference in performance.

If disable Diagnostic Tools don't fix the problem try to disable IntelliTrace,
Unchecking Enable IntelliTrace, in Tools -> Options -> IntelliTrace.
Work for me.

I have tried disabling few things myself just to see what is causing it. The only thing that did work for me is Tools > Options > Debugging > General > "Enable JavaScript debugging for ASP.NET (Chrome and IE)".
I'm using VS2017 Enterprise v15.2 for Asp.net WebForms.

Hiding the Threads window did the trick for me.

I also experience the lag when "Enable Javascript debugging for ASP.NET (Chrome and IE)" is checked. And Turning off the "Enable Diagnostic Tools while debugging" did not help.
However, I also noticed that when I F12 for Chrome Developer Tools, then lag time goes away and the app performs.
Hope this helps.

Only one thing that helped me was disabling Debugger option of Resharper.
If you use Resharper, try to UNCHECK "Show local variables values in editor" in menu: Resharper -> Options -> Tools -> Debugger.
It helped for me.

What worked for me was removing all the following folders in the solution's directory:
.vs
x64
Debug
Release

I experienced same problem. In debug mode, my webforms project ran very slowly. When using Ctrl+ F5, it ran quickly (as it does when deployed). I found a try/catch block that was executing 45 times. It wasn't doing anything, it was just trapping an error that I had made. I fixed the error and, when removing the try-catch block - voila! -- back to full speed.
So if you're experiencing this problem and you've tried all the solutions above (I did), look for a try catch block that is firing often. [ Fix your error :) ] and then remove the try-catch block. I can't believe the difference it has made. Shouldn't have made any difference at all, of course, since the try-catch block wasn't doing anything, but it did.

I also had this problem, for me helped disabling Enable Edit and Continue options in Tools → Options → Debugging → General.

I gave up getting Debug=>Attach To Process working... even tried ALL the solutions on this SO post (2-pages worth).
Solution
Use ReAttach VS IDE Extension. This bypasses the need to ever use the Attach to Process dialog again if it's a process you've recently attached to.

If you are using VS 2017 Enterprise edition, try disable IntelliTrace feature
(Tools -> Options -> IntelliTrace)
with this feature turned off, the laggy behavior went away even keeping the Diagnostic tools turned on (Tools -> Options -> Debugging -> Enable Diagnostic Tools while debugging)

Sometimes it is because of a Realtime scan in Antivirus.
"Add exceptions" Visual Studio files/folders for your Antivirus
C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ devenv.exe
C: \ Program Files (x86) \ Microsoft Visual Studio \ 201

I had this problem where the program was running slower if started from visual studio, turned out to be too many threads, like alot of new System.Threading.Thread() in a loop etc. I switched the code to use the ThreadPool instead with Task etc and the slowness went away.

choosing "Load only specified modules" did the trick (Tools=>Options=>Debugging=>Symbols)

In my case I had a break point with a condition that was never met. I had forgotten about about this break point altogether. Sometimes adding a simple condition to a break point can slow down the debugging speed a lot.
Just adding this in case it might help someone.

workaround that I used was to run msvcmon.exe locally with admin mode before starting the debugger. Then start the attach window and providing the remote debugging port.

Related

Keyboard shortcuts not working after process attach (Visual Studio 2013 bug during debugging)

I've written small VSIX plugin which is able to attach debugger to particular process. This process is written using c# and c++ code, so I need to attach to it using both managed and native engines. From Visual Studio it can be achieved simply by selecting these engines from window opened by DEBUG -> Attach to process... -> Select...:
Below, I've shown the code sample which basically does the same thing, using Process2.Attach2 (MSDN):
EnvDTE80.DTE2 dte = GetService(typeof(SDTE)) as EnvDTE80.DTE2;
EnvDTE80.Debugger2 dteDebugger = dte.Debugger as EnvDTE80.Debugger2;
EnvDTE80.Transport transport = dteDebugger.Transports.Item("default");
EnvDTE80.Engine[] engines = new[] { transport.Engines.Item("managed/native") };
process.Attach2(engines);
Unfortunately, the very same code which works for VS2012, doesn't work for VS2013 (Update 1).
What I've noticed is keyboard problems. Visual Studio doesn't react for pressing key shortcuts. For example, if I press F10, debugger does nothing. If I want to step over any breakpoint, I need to use mouse instead and access context menu: DEBUG -> Step Over, etc.
It's annoying, I need the keyboard to control debugger. Has anyone noticed this problem and solved it already?
BTW: If I use managed engine only (transport.Engines.Item("managed")), the keyboard starts to work correctly. But because I need to debug through unmanaged code also, I need additional engine - the native one.
EDIT: I've reported it also to Microsoft Connect network.
I've found temporary workaround. To fix that issue I opened TOOLS -> Options... -> Debugging -> General and checked Use Managed Compatibility Mode option:
What's more, this change paradoxically fixes another, seemingly unrelated issue, namely evaluation of expressions in Watch or Immediate windows for some particular cases (which I also noticed few days ago).
UPDATE:
I've detected this issue using Microsoft Visual Studio Premium 2013, Version 12.0.30110.00 Update 1
After installation of Version 12.0.30219.00 Update 2 CTP, this problem is no longer reproducible for me.
As Jarek mentioned above, this issue shouldn't repro in Update 2 CTP 2. If you are still encountering it, please reactivate the Connect bug

CodeLens not showing references

CodeLens stopped working for some reason in project solution that I'm dealing nowadays. It is not showing references instead "- references". However, when I open up Visual Studio with another project It works like charm.I can confirm that CodeLens is enabled. Do you have any idea to make it work?
My Solution:
Toggle the CodeLens feature off and then on again.
Note: Many have found the feature to be turned off after an update so you just need to turn it back on. Thanks to #razblack for calling this out. Don't forget to give his comment an upvote if this was your issue!
Go into Tools -> Options... -> Text Editor -> All Languages -> CodeLens.
Uncheck "Enable CodeLens" option and click OK.
Go back into Tools -> Options... -> Text Editor -> All Languages -> CodeLens.
Check the "Enable CodeLens" option and click OK.
Note: I've fixed the issue once before by closing the problem .cs file and then reopening it. Closing any referenced files may also be required.
My Problem(s):
Similar to the original poster, CodeLens stopped refreshing references after I made a bunch of refactors. I was seeing stale references to code that didn't exist and I was also seeing the "- references" issue as described in the original post.
My Environment & Specific Scenario:
Visual Studio 2015 with Service Pack 2 and Resharper Ultimate 10.0.1
I was doing a major overhaul with a ton of refactoring and my project wasn't compilable for an hour or so. Once I could compile the project again, the references weren't working.
Same problem here.
CodeLens works normally with small solutions, but not working with large ones.
And this behavior is accompanied with crash of Alm.Shared.Remoting.RemoteContainer.dll process.
Tried in VS 2013 Update 4 and VS 2013 Update 5 RC.
Solution:
Close all programs and clean %LocalAppData%\Temp folder (or maybe just ALM folder inside it).
A simple solution, which works!
I did try enabling CodeLens in Visual Studio (2015) -->
Quick Launch (Ctrl+Q)
Options (CodeLens)
But, it was enabled :( Then, it did work with: (Closing the programs),
Win+R --> %temp% EnterDelete all
For me, CodeLens was disabled, so make sure it is still enabled.
I know it is an easy answer, but it might help some developers.
Go to Tools -> Options -> Text Editor -> All Languages -> CodeLens then click the "Enable CodeLens" option if it is not checked and then save it.
It looks like VS disabled it for some reason, maybe after an update or slow startup.
Try to remove .suo file which is storing some enviroment/solution settings. This helped me.
Just had this problem with VS 2019.
I tried disabling / enabling codelens and it didn't work.
I deleted the .suo after that and it didn't work.
I tried disabling / enabling codelens again (after deleting the .suo) and now it works again.
UPDATE (about 2 weeks later):
It started happening again and this time I disabled IntelliCode in Extensions and all of a sudden Codelens started working again.
UPDATE AGAIN (25 Nov 2019):
I reported this to Microsoft and had a dialog with them. You do not have to turn off all of Intellicode at this time, only disable Intellicode Refactorings in Tools -> Options -> Intellicode. The actual fix is slated for VS 2019 16.4 I believe.
You may have circular references in your solution that prevents CodeLens from working. Some details were provided in the comments for this issue on the Visual Studio Connect site:
Somehow, two of my projects in my solution ended up referencing each
other causing a circular reference. I think it was a by-product of
Resharper's shortcut to reference an undefined class. Once I was
cleaned up all of the references, I'm now getting valid values in my
reference counts.
How did you go about "cleaning" up references?
In my case, my solution has multiple project files. In the references
folder of Project A, there was a reference to Project B. In the
references folder of Project B, there was a reference to Project A.
This was causing the circular reference. If you try to do this
"manually", VS will prompt you with a warning regarding the circular
reference.
To clean this up, I removed the reference to Project B from my Project
A. I had do some minor class definitions in my Project B so everything
would still compile in the end.
I found out that if you block the Visual Studio with the Firewall, the Code Lens did not work.
So unblock it from the firewall to make it work.
Or edit Firewall settings for file:
C:\Windows\Microsoft.NET\assembly\GAC_32\
Microsoft.Alm.Shared.Remoting.RemoteContainer\
v4.0_12.0.0.0__b03f5f7f11d50a3a\
Microsoft.Alm.Shared.Remoting.RemoteContainer.dll
I had this problem with VS2015 that already had "update 1" installed.
The thing was that I originally installed VS2015 with the "custom" setup, not the "default" option, and I accidentally left out the "Git for Windows (3rd party)" option under "Common Tools".
This can be fixed by these steps:
Run the VS2015 setup again (from control panel - uninstall program)
Right click VS2015, select "Change"
On popup screen, select "Modify"
On setup screen, select "Git for Windows (3rd party)"
Move on with the setup, install selected features
In Visual Studio Professional or Enterprise you can enable CodeLens by doing this:
Tools → Options → Text Editor → All Languages → CodeLens->Enable
This is not available in some Community Edition versions
Try deleting .suo file inside of the hidden .vs folder in your project. This worked for me in VS 2017.
My Problem
Always directly after enabling CodeLens, press OK, i see the extra space required for the CodeLens information and than it disappears and when i look at the options again it is diabled. Driving me nuts.
Approaches
Deleting caches/configurations. Clean start without Extensions work. Normal start without ReSharper works. Reinstall ReSharper + deleting cahces -> False behavior
Solution
Unter Extensions - ReSharper - Options - Environment - Performance Guide was "Disable CodeLens for all languages" set to "Fix Silently". Set to Ignore -> WORKS!
hope this helps someone
I had the same problem, but one's of my colleagues who has the same development environment than me, doesn't have it...
The only one difference between our both environment was the quantity of RAM. There is 10GB allocated to his VM, and on mine, there is 6GB allocated. Since I upgraded the quantity of RAM allocated to my VM to 8GB, all my references are shown !
Installing Update 1 for Visual Studio 2015 fixed the problem for me.
Download Update 1
After reading the answer to this Stack Overflow question CodeLens only showing references? I decided my problem with Codelens was I was running Visual Studio 2015 Update 1 but was using Team Foundation Server 2012. I upgraded to TFS 2015, which upgraded in place and didn't require any new settings or URIs to be connected to Visual Studio as before. Then I reloaded my solution - but I still had the issue where it just said "– references" everywhere. I closed Visual Studio, started it again and reloaded my solution and finally I saw the correct reference counts as they used to show.
I found on the new VS 2015 update 3 it happens on a large class in a medium level solution 10+ projects and has nothing to do with circular references, a bad SUO file, or other things. It appears just deleting the temp file location(as mentioned already), closing VS and then reopening and hitting 'ALT+2'(forcing a reference find for Code Lens) made it magically work for me.
It also appears in some solutions and projects Visual Studio will create an old referenced suo file in .vs folder. I don't know the exact rhyme or reason, but it could be created in my case and the CodeLens worked again. It could potentially be a Visual Studio options is somehow referenced in projects under source control. As I know this happened with an older solution I have upgraded many times that was under GitHub control and it does have an .gitignore file(ignore files could change depending on source control). Suffice to say I have had similar things happen with other techs in the past when there is a lock on a source control file that should be updated and won't update. Simple answer is to add to an ignore and delete the settings file.
I have Visual Studio 2017 Professional on Windows 10.
I have observed this under several circumstances:
MicroSoft decided I needed some critical update for Windows and it installed while I was working - causing some of the VS components to crash.
Visual Studio update was received in background.
Some component of Visual Studio crashed - not the VS just some attached feature (did not note exactly which one)
No known cause.
In each of these cases I did in order (sometimes it worked after each of these)
Build / Rebuild solution
Build / Clean Solution
Close and Restart Visual Studio
Remove Symbols cache, restart VS
Close BOTH VS and SSMS and restart them
Close VS and Restart Windows
Close VS, force all pending Windows updates to load, restart Windows
In options, Uncheck Codelens/apply and re-check/apply (OK button)
I tried most of the solutions above without luck, as I also saw this problem. On top, certain newly added classes were showing up as white/black (regular text) in Visual Studio.
Changing to Release typically helped, but wasn't a long-term solution.
However, this helped on both issues - verified on another machine. Maybe some of the steps can be left out.
Close all document tabs
Clean solution
Right click on solution, click "Enable Lightweight Solution Load"
Close solution
Reopen solution
Right click on solution, click "Disable Lightweight Solution Load"
Close solution
Reopen solution
Rebuild
Explicitly enable CodeLens in the workspace settings.json:
// show code lens on editor
"editor.codeLens": true,
Verify that the following properties show on the editor:
// inline count of reference for classes, interfaces, methods, properties,
// and exported objects
"typescript.referencesCodeLens.enabled": true
I could fix my problem with C# CodeLens and Omnisharp.
My C# extension was 1.25.0.
What I did to fix my problem:
C# extension -> Unistall -> Install another version -> Version 1.24.4
After that in the settings I searched for "omnisharp: use global mono" and set it from "auto" to "alwayse".
Then restart Omnisharp and wait for it to compile and show references.
Removing data from %temp% folder resolved my issue in VS 2022.

visual studio edit and continue does not work

In my project which is a hybrid project (in previous it was a web forms project that then we modified to use mvc pattern).
Now I want that in debug mode, I want to change something in my cs file, and
then I want the changed code to run.
I've tried enabling and disabling tools -> options -> debug -> edit and continue checkbox part.
When it is enabled I can't change code in my project while debugging.
When it is disabled I can change code but it does not affect on running part.
for example.
int i = 0;
if(i == 1)
return 1;
else
return 2;
In debug mode I changed i to 1 but it stil returned 2, in the following code, only when I stop and re-run the debugger it takes affects.
int i = 1;
if(i == 1)
return 1;
else
return 2;
BTW I am using Visual Studio 2010 version.
This wasn't my problem; running VS2017 RC2, I found that under Tools -> Options -> Debugging -> Just-In-Time - my "Managed Code" was deselected.
There was a warning "Another debugger has registered itself as the Just-In-Time debugger. Fix by enabling Just-In-Time debugging or running Visual Studio repair".
I had not registered any other debugging tools! So no idea why it unticked...
So the fix was simply to tick the "Managed" box....
None of the given answers worked. Here's what I did.
I repaired the VS installation. I had 2017 version.
I unticked the Native code checkbox.
None of the above worked for me on their own, but once I unchecked "Enable Native Edit and Continue" then it worked: under Tools -> Options -> Debugging -> General.
Under Tools -> Options -> Debugging -> General: Check the box for 'Enable Edit and Continue'.
Under Tools -> Options -> Debugging -> Just-In-Time: Check the box for 'Managed Code' Image Checking Managed Code
Save and restart Visual Studio. If you get a warning about elevated permissions, accept the dialog. Your changes are not saved yet. After restart, go again to Tools -> Options -> Debugging -> Just-In-Time: Check the box for 'Managed Code' if not showing checked. Save and restart Visual Studio.
The solution of this problem is on the Microsoft Documentation... After you enable tools-> options -> debud -> edit and continue.... There is more to do..
If IntelliTrace is enabled and you collect both IntelliTrace events and call information, Edit and Continue is disabled.
On Visual studios' menu go on Tools>>options - Select "IntelliTrace" tab and let IntelliTrace events only checked.. Save, restart the visual studio and.......
Your Edit and Continue will work again!
I discovered that my
VS2019: Project (context menu) =>
Properties =>
Debug =>
Debugger engines =>
Enable native code debugging
was turned on. After unchecking this my "Edit and Continue" issues disappeared!
Note: I had tried suggested fixes (here) prior to this discovery.
Edit & Continue doesn't work - this has fixed it for me - it's for VS2017 and started happening recently (March 2019).
It seems like NCover sets the system variable COR_ENABLE_PROFILING=1. Uninstalling it gets rid of it for me.
Repairing the VS installation, and upgrading to the current latest VS2017 version: 15.9.19 fixed the issue for me.
h-rai's answer gave me the clues I needed: unchecking the Native checkbox made a warning appear stating that another JIT debugger was registered.
Then, I found more clues in this article here
Perhaps, my issues were caused by having installed the new .NET core 3.1, but not having upgraded VS2017 to VS2019 yet.
Now, when I uncheck the "Native" checkbox, I do not get the warning about another JIT debugger, and I can modify code while debugging once again.
Before that, the Runtime Compilation was enabled by-default. For projects targeting .NET Core 3.0+ users need to explicitly enable that behavior by following the instructions https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.0
install from Nuget package manager Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Run the below command:
Install-Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -Version 5.0.7
and add below line in Startup file
services.AddRazorPages().AddRazorRuntimeCompilation();
If you've already updated Debug options but Edit&Continue still doesn't work, try cleaning and rebuilding the project. (worked for me in VS 2022)
Just press the Break All button, then edit your code, then press Continue.
It is work for me like a charm

Visual Studio 2010 intellisense stopped working

I've got a small problem with the VS2010. I installed Resharper and soon after my installation period has expired, My Visual Studio 2010 Intellisense stopped working. Its very hard to work without Intellisense. It doesn't even show the member properties even . I tried doing devenv.exe /ResetSettings and I end up with an error saying:
it is not recognised as a internal or external command, operable program or batch file.
My solution
I don't know how people are solving this but I just solved my above problem by resetting the Vs settings. Tools-->Import ExportSettings-->selecting the reset all settings and following the wizard .
By doing this of course I lost the little settings I made just like adding line numbers and stuff, but I did that again.
Not sure if this is the ideal solution for people looking for an answer, but just helped me to get the Intellisense in the first place which I was actually looking for.
This worked for me.
http://miguelmoreno.net/post/Intellisense-not-working-in-Visual-Studio.aspx
In Visual Studio select Tools > Options > Text Editor > All Languages. Ensure that the checkboxes in the Statement Completion section are actively checked (not grayed out).
For risk of sounding like tech support:
Reboot your machine and check if Intellisense is back, else try devenv /ResetSettings again.
I tried to reboot and devenv.exe /resetsettings.
What actually worked for me was the following:
Goto Tools > Options > Resharper
Suspend Resharper
Resume Resharper
No application restart or PC reboot or anything required after that.
Found here: http://geekswithblogs.net/GruffCode/archive/2010/11/09/resolving-issue-ldquoresharper-auto-completion-live-templates-and-intellisense-stop-working.aspx
Saving my project then restarting VS worked for me.
I accidentally had two of the same file open in the IDE. After closing one of them, intellisense started working again! This is how you can reproduce it:
Drag a tab onto your desktop, then open the same file by double clicking it in the Solution Explorer. You now have 2 of the same thing open. You can now drag that floating window back into the IDE as a tab and now you (unfortunately) have 2 of the same file open at the same time. You can only edit the original one and the other one will drive you crazy.
#Ronald McDonald, I tried that solution, but everytime I go back in, the Statement Completion options are reset, so that the boxes are filled, not checked (i.e. on for some languages, off for others). I'm guessing that it's ReSharper responsible?
For anyone else having this problem, if the above solutions don't work, and you have ReSharper, give this a try:
Reset key mappings in Visual Studio: Make sure only one instance is running. Tools -> Options -> Environment -> Keyboard -> Reset.
Restore ReSharper keyboard shortcuts: ReSharper -> Options -> Environment -> General -> ReSharper keyboard shortcuts. Close Visual Studio.
It's too early to tell, but I think (hope) that this has worked for me. I keep losing not only Intellisense, but undo/redo stops working (even greys out in the Edit menu, until I reopen the menu a few times), along with copy/paste and most (sometimes all) Ctrl+ keyboard shortcuts. I've had this problem for years, on different computers, and I'm pulling my hair out trying to fix it. I really hope this one finally worked!
First check in VS tools-> options-> editor -> statement completion is checked (not grayed out).
Then follow this procedure:
close all open files in the VS IDE.
Save & restart VS.
Make sure the file you are writing into is included in the project (and not excluded by mistake)
If this does not solve the problem, close VS & try from the command line running: devenv /ResetSettings
else try installing the hotFix: http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=26662
cheers
Change the path location for the project . If it exist in some folder then place it into another.
This will solve the issue
Intellisense stopped working. Tried the methods suggested here to no avail. Noticed it was only affecting only the current file. Closed Project, deleted the .suo file and restarted project. It is now working for all files. :)
If using ReSharper:
ReSharper / Options... / "Clear Caches".
Quit and restart Visual Studio.
I found that I had mistakenly uninstalled SQL Server Compact 3.5 SP2.
Re-installed, then set Options->TextEditor->Advanced->Disable Database = False
worked for me.

Visual Studio 2010: very slow web applications debugging!

I recently installed Visual Studio 2010 (Ultimate edition, final version released in April), and found that debugging a web application became very slow (2-3 times slower than in Visual Studio 2008)!
I took the same web application and checked the speed of loading of one of its pages in VS 2008 and VS 2010, and compared the time it takes to load the page.
I tested it using 2 approaches: 1) debugging under ASP.NET Development Server (by pressing the "Start" button) and 2) using ASP.NET Development Server without debugging (by using the "View in Browser" menu command).
And I got the following results for Visual Studio 2008 and 2010.
1) ASP.NET Development Server withoud debugging ("View in Browser"): the speed of page loading is the same in VS 2008 and 2010.
2) Debugging under ASP.NET Development Server ("Start" button): in VS 2010 the page takes more time to load than in VS 2008 - VS 2010 debugging is 2-3 times slower than in VS 2008!
3) At the same time, when debugging a web application in VS 2008, it takes the same time to load the page compared to when using only the "View in Browser" command. That is, VS 2008 debugging does not introduce any overhead to page loading in the web browser!
I wanted to make sure that other people have the same problem with slow debugging of web applications in VS 2010. Can this issue be solved by any means?
BTW, I am using Windows XP SP3.
Thank you.
Disable Intellitrace (historical debugger) - it enable jumping "back in time" during debug but it slows down debugging.
You can disable it from the options->intellitrace
Try 'Delete all breakpoints' from the Debug menu. It sped up my web application debugging by 10 times.
I had problems with slow Visual Studio debugging when "Native Code" debugger was enabled. Try disabling it.
On "Visual Studio 2010" go to:
Project Properties ->
Web ->
Debuggers (bottom of page). ->
Disable all exept ASP.NET
Hope it helps.
Similar question: 1
After incredibly slow debugging for months I finally discovered the cause (even after disabling intellitrace).
It turned out to be PC Tools internet security -> IntelliGuard -> 'Behaviour Guard'
This is a hips like protection system that monitors the 'signature' of system operations
I disabled this feature and wow what a speed difference - 'stepping into' lines of code in debug now has almost zero delay. I re-enabled Intellitrace and can use it with only a very slight speed hit.
Tino
I tried a lot of things and the only way to solve it was the swax solution 'Delete all breakpoints'
I had this problem as well and it turned out to be due to sybmbols.
Go to Tools > Options > Debugging > Symbols and uncheck any symbol servers
Deactivate the option Show Parameter Values in the callstack window (debug -> windows -> callstack -> left click).
It required lots of recursion.
Reference
I did find out what you have to do:
Disable Intellisense
Disable the Graphics Rendering Editor Function, this causes editor slowness
with some graphics cards.
Disable the Sourcecontrol that is set by default to the Microsoft Server Product.
I just can tell you, that VS2010 is a very good product, if you
know these few things, and setup this.
You can uncheck the Symbols servers.
Try removing the localhost from the list of trusted sites in IE security settings.
For me it solved the problem of slow JavaScript debugging in VS 2010. It may work for you if you have added 'localhost' (or any other domain name you use for local development) to the trusted sites list, like I did.
I can get it faster by clear all break points, all unnecessary variable in Watch windows, and all the unnecessary debug windows, such as CallStack ...
I realized that ESET Internet Security also makes lots of performance issues while debugging in Visual Studio 2010 using ASP.NET Development Server.
Recently I faced with the same problem. I noticed that I had too many messages (especially "A first chance exception ...") in the VS's Output window. I fixed those exceptions and everything went fine.
What is expensive too sometimes is debugging the JavaScript libraries you are using or developing.
Checking the option "Don't open a page" in the project property window allows you to debug the web application without debugging JavaScript. You simply have to open the web application in your browser manually.
In some circumstances debugging JavaScript can break the responsiveness of the debugging process and if you know that your concern is with the .NET debugging, you can make load time faster that way easily.
Taking another route of Paulius' answer (disabling "Native Code" debugger) I was able to speed up the debugging. Here are the steps I took for VS 2010 Pro:
1) Tools > Options > Debugging > General
2) Ticked Enable Just My Code (Managed Only)
3) Also this might help, unticking Enable address-level debugging
There is another trick you can do:
1) Go to (Ctrl + Alt + Del) Task manager > Processes
2) There are 2 main processes for visual studio debugging, 1)devenv.exe 2) WebDev.Webserver40.exe (Or similar).
3) Right click on each of the bove processes > Set Priority > Real Time. Click Ok in the message Box.
Speeds up debugging dramatically!.

Resources