When project is stopped (not in the debugging state) and you press F10, normally the debugging session starts and VS stops at the entry point (e.g. Program.Main). That always worked for me in VS2005 and works OK in VS2008. But recently that stopped working in my VS2005 - the project just runs as if I pressed F5, so I have to place a breakpoint at Program.Main when I need to stop at the entry point. Though it continues to work as it should in my VS2008.
I suspect, that's because I installed Reflector add-in and it changed some settings in VS2005, but I just can't find out which settings. Also, disabling that add-in has no effect on my issue :-(
Please help, thanks in advance.
OK, I found a solution
1) switch on the 'Just My Code' option
Tools -> Options -> Debugging -> General -> Enable Just My Code
2) restart VS
voila
Related
I have a problem with my IDE. Simply in asp.net web application project when I try to start debugging with Chrome, the problem shows up.
The problem doesn't occur selecting Edge browser for debugging by the way.
https://i.stack.imgur.com/prHhc.png
Also I have no problem when I unclick "Enable javascript debugging for ASP.NET (Chrome and IE)".
For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, which I believe is a new feature introduced in VS 2017.
Go to: Tools > Options > Debugging > General and turn off the setting for:
Enable JavaScript Debugging for ASP.NET (Chrome and IE)
The problem solved by following setting
VS-2017 -> Tools -> Options -> Debugging -> General: Uncheck/Disable the "Enable JavaScript Debugging for ASP.NET (Chrome and IE)" option
I tried the other options provided above such as Restart VS-2017, closing browser opened earlier but that didn't solved this problem. I have installed VS-2017 Community Edition one week back only.
Solution
Make sure any previous opened Chrome debugging windows are closed before you start a new debugging session
Explanation
When I started debugging from VS2017 a new Chrome window opened and when I stopped debugging the Chrome debugging window were shut down and then I could start debugging again.
If the Chrome debugging window wasn't shut down upon debugging stop for whatever reason, and I started a new debugging from VS then it opened a new tab in the previously opened Chrome debugging window, and I had the error and couldn't start debugging.
So I closed the debugging window manually before I started debugging and it worked again.
I just had the same problem, solved it by restarting Visual Studio 2017.
I want share my my solution. Just restart your Application and App Poll in IIS. Hope it helps you.
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.
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
I have be driven mad. Sometimes I press F5 to debug, and I often press shift+F5 to exit debug, but it restart debug(shortcut of restart debug is ctrl+shift+F5). If I click some var it will navigate its definition. I just find I must press ctrl again lonely will disable it.
Anyone know why? Thx.
It's a known issue.
There are indeed multiple Connect tickets (1, 2, 3, 4) on this problem. The latest one states:
Thanks for reaching out to us. The original bug is indeed fixed in our current internal builds but that fix was not included in VS 2010 SP1. Keep an eye out for announcements of pre-release builds of the next version of Visual Studio as they will have the fix in them.
Thanks!
-Sean Laberee
VS Pro Team
This basically sounds like "it won't get fix, but VS11 shouldn't have the problem anymore."
A good workaround is to disable the Ctrl+Shift+F5 shortcut for restarting debugging under Tools -> Customize -> Keyboard....
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.