Breakpoints are not highlighting the entire line in Visual Studio 2013 - visual-studio

I recently installed the Update 2. So now when I put a breakpoint it just puts a red dot on the left side of the file, but it doesn't highlight the entire line. I am not sure if Update 2 changed the settings, but I thought so.
I tried this: in Tools>Options>Debugger>General>Highlight entire source line for breakpoints and current statement (C++ only). So it tells that this doesn't work for C#. What should I do to highlight the entire line?
UPDATE:

I had the same problem and it went away by closing VS 2013 and delete / rename following registry keywords:
12.0_Config
12.0
in
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\
when restarting Visual Studio, the config settings dialog appeared and I selected not to import settings from previous version.
Breakpoints and current line while debugging were normal again :)

I had the same problem on visual studio 2012 and by following the instruction by McNos, I was able to resolve the problem.
In my case, I renamed the registry node 11.0 to 11.0-OLD and 11.0_Config to 11.0-Config-OLD under
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\
Restarted visual studio and it popped the config settings dialog...
Thanks McNos

I could not find the configuration for VS2019. Then I searched a bit more and found that this command fixes the issue:
devenv.exe /updateconfiguration
Reference:
https://developercommunity.visualstudio.com/t/debug-no-longer-highlights-current-line-yellow-lin/25156
Note: the problem started to happen after installing the lastest VS update.

Related

Visual Studio 2015 Crashes While Moving Tabs or Sorting Internal Windows

Visual Studio 2015 suddenly crashes while moving any internal window to another place (Toolbox - Solution Explorer), or moving tabs to another window that already has tab in the second monitor.
If moving opened tab to another monitor it working good but once move the second tab beside it, It crashes.
I've uninstalled it and re-installed but the issue still.
I made all commands here Visual Studio 2015 crashes .. but nothing help
#Sergey Vlasov .. Thanks a lot .. Fixed after following these steps
Edit %InstallRoot%\Common7\IDE\devenv.exe.config
Edit %LocalAppData%\Microsoft\VisualStudio\14.0_xxx\devenv.exe.config .. Actually for me after added the following line in the first config file it was added to the second file automatically.
Append the following text to the AppContextSwitchOverrides element’s value attribute:
;Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true
After restarting VS, you should be able to drag your VS windows around without crashing.
However, based on feedback provided by users who have tested this workaround, it might not resolve the issue on systems where KB4598299 was installed.
Most probably caused by recent Windows 10 updates: https://www.bleepingcomputer.com/news/microsoft/recent-windows-10-updates-cause-visual-studio-wpf-app-crashes/

"Please correct before proceeding." - Web.config error

I attempted to launch a website project locally but received the below message in an error dialog:
Please correct before proceeding.(You might rename the current web.config and add a new one).
Typically this error is preceded by a general description of the cause, this one was not. Knowing odd, out-of-the-blue, problems such as these are typically related to corrupt IDE generated files. I tried deleting the .suo, .vssscc and other generated files from the solution and project directories but the problem continued.
This happened to me today after getting latest. I resolved by closing and reopening the solution, rebuild, then run. All is well...
I actually resolved this by making sure the Web.config file wasn't an open document inside VS 2015. In other words, close the Web.config file wherever it might be open, and make sure your Team Explorer isn't causing any problems, like an unexpected change or staged change...rebuild the sln and run...
Close vs2017 and open it again worked for me
just open web.config and run again.I've had this problem and I resolved by this solution .
I fixed the problem using a solution I found for a different IDE-related issue (original answer here). Run the following in an elevated command prompt:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" /setup
Note: You'll need to adjust the path for your version of Visual Studio (original version mapping answer here):
Visual Studio 2005 = 8
Visual Studio 2008 = 9.0
Visual Studio 2010 = 10.0
Visual Studio 2012 = 11.0
Visual Studio 2013 = 12.0
Visual Studio 2015 = 14.0
This issue came to me after merging some code in version control using RTC tools. When I saw whyoz answer I noticed that web.config wasn't opened anywhere. It could be RTC locking the file or something like this. So, I simply restarted Visual Studio and it became normal again.
I ran into this issue today after doing a branch merge using the VS19 built-in Git tools. The config file was correct; I even used a schema validator based on KD2ND's answer in how can I validate dot net application config file(ex, app.exe.config) on console?.
I cleaned the solution, unloaded it, and reloaded it, and everything worked fine. I didn't even need to restart studio.
Based on others' answers, this appears to be related to code merging in the IDE. It's a weird problem but it's a relief that the solution (once found) is simple.
As an FYI, in VS 2019 the solution is to close the tabs, and the solution and Visual Studio, then restart Visual Studio. This has worked for me.
in Microsoft Visual Studio 2019 : Just neeed to close project, thenn open+ clean+rebuild and everything work
In VS 19 Enterprise, the Solution for me was:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe" /setup
Based on the merked answer from alan.
I had just opened the web.config file and then pressed CTRL K + D. it will make the formatting good of the file. and then run the application. it worked for me.
Even if you undo the above changes then also it works. it is weird somehow.

Visual Studio 2012 syntax coloring for C# types [duplicate]

Somehow part of my syntax highlighting for C# code has disappeared in the VS 2012 IDE. Uninstalling, rebooting, and reinstalling does nothing, nor does resetting the colors in the options dialog.
Here are some examples of items which all appear in default (black) that normally have color which don't:
Attributes
System classes
My own classes
And here are some keywords that still have color:
using
public
void
var
for
Has anyone else experienced this and managed to fix it?
Here is a simple solution. Go to the directory where devenv is (for 2012 RC), and type devenv.exe /setup. It will fix your problem.
devenv.exe is usually in something like C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE.
Edit: It has been suggested that you do this from the Visual Studio command prompt (Start>Microsoft Visual Studio>Tools>Visual Studio Command Prompt), and/or make sure your command prompt has administrator permissions.
Note for others: This has a very good chance of working for many other versions of Visual Studio, including 2008, 2010, 11 beta, ...
My problem was limited to having the "DateTime" type not showing up in light blue like other class names. I fixed it by simply switching back-and-forth between VS Themes. Discovered by accident. Much quicker than reset settings or repair install...
VS menu Tools -> Change Color Theme
This is what worked for me:
1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
2 - open vs console as administrator, and run:
devenv.exe /setup
devenv.exe /ResetSettings
This will reset all your environment settings.
If none of the above work for you, delete all GUID-named folders under this registry key (make sure your Visual Studio instance is closed):
If you're using Visual Studio 2012:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\FontAndColors
If you're using Visual Studio 2013:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors
If you're using Visual Studio 2015:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\FontAndColors
Restart Visual Studio, and you should see a few various "User Types" to configure. You can then import your Fonts and Colors that you backed-up, and everything will be good to go. This may also work for previous and future versions of VS, but I have not tested.
Disclaimer: Make sure you export/backup your current Fonts and Colors settings before making these registry adjustments. I cannot be held responsible for you losing your configs :)
If you still have this issue try ResetSettings (worked for me)
NOTE: this will reset the Visual Studio 2012 settings :)
1) close vs.
2)open cmd (as administrator).
3) go to devnev.exe folder (something like "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE" ).
4) type "devnev.exe /ResetSettings"
5) open vs and look at the beautiful colors
Found the source of the problem:
If you have the "Productivity Power Tools 2012" installed,
you should go to Tools -> Options -> Productivity Power Tools
and turn off the "Colorized Parameter Help" option.
This fixed the syntax highlight problem.
If anybody runs in to the same problem for Visual Studio 2013 as I did, the only solution that worked for me was to first close VS2013 and then delete the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors
After reopening VS2013, my syntax highlighting for types was restored.
Prior to deleting the registry key, I noticed that all of the "User Types..." settings in the Fonts and Colors section of Tools > Options were missing. Deleting the registry key restored them. They attained their default values which gave me the syntax highlighting colors I was looking for.
This was the only solution that worked for me. Switching themes, resetting my personalized settings to defaults, running devenv.exe with various command line switches to setup/reset Visual Studio did not work.
I also created the following bug report with Microsoft on their Connect site:
http://connect.microsoft.com/VisualStudio/feedback/details/810985/incorrect-syntax-highlighting-for-c-types.
For me "Productivity Power Tools 2012" was the cause. Nothing suggested here helped. After removing the Power Tools the colors came back.
I did all the things listed here and still nothing (VS2013 Update 3). I tried /setup, /resetsettings, deleting the stuff in AppData, deleting the registry keys. Still, User Types wouldn't be highlighted even in the default color scheme.
What helped in the end was opening the Fonts and Colors dialog, selecting Identifier, and making it Bold. Then removing the Bold. Instant fixage!
I had the same issue....just uninstalling and re-installing alone did not correct the problem. After I un-installed, deleted all remnants of VS 2012 in program files, removed all related registry keys, and deleted the VS 2012 folder from My Documents, then re-installed, user types showed up in the display items in fonts and colors and everything went back to normal. My guess is that it was an issue with one or more of the registry keys but I can't be sure of that.
exit devenv
go to below path
hkey_current_user\software\microsoft\visualstudio!
remove 9.0 , 10.0 , 10.0_config (i mean to say all other folders except 11.0 and 11.0_config)
Now start devenv and see the magical colors get back normal
1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
2 - open vs console as administrator, and run:
devenv.exe /setup
devenv.exe /ResetSettings1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
2 - open vs console as administrator, and run:
devenv.exe /setup
devenv.exe /ResetSettings
This is what helped me...
delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
open vs console as administrator, and run:
devenv.exe /setup
devenv.exe /ResetSettings
This solution worked for me. Thanks alot Gaz Winter
If you've installed the preview of Roslyn, unintstall it. This worked for me.
After trying several of the solutions listed here, I eventually found that my issue was caused by a very large (488000+ characters) string variable. Highlighting was working up to that line, but not after it. Once I reduced the length of the string, highlighting in the rest of the file resumed working normally.
I already had VS 2012 Pro installed on my machine. I then installed VS 2013 Pro and started facing this color issue. I then deleted the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors key and opened VS 2013. This approach solved my issue and the colors were back.
If the windows desktop is configured with a high contrast theme the syntax coloring seems to disappear completely from Visual Studio. If this is the case, select a normal windows theme and set a solid background color (if you don't want a background pictures) to restore syntax coloring in VS.
Problem : Class name and Syntax showing in black color
Solutation:
Step 1: Remove Key :
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors
Step 2: Remove folder :
C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\12.0
Step 3: Open command prompt (admin mode) and run below command line :
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE>devenv.exe /setup
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE>devenv.exe /ResetSettings
It work for download this "Productivity Power Tools 2012" and install, after install this tool get this steps go to Tools -> Options -> Productivity Power Tools and turn off the "Colorized Parameter Help" option.
This fixed the keyword as syntax ActionResult is not set for default black color and highlight problem resolved.

Visual Studio 2010 Exceptions dialog is empty (as of today)

Starting today, I noticed that the Exceptions dialog within VS2010 appears empty, and I can therefore not make any selections within it. I am not sure where to go to begin trying to fix this, as I see no error or anything. This has previously worked. Following is a screenshot:
I have tried checking if any updates were installed recently (none were), and no new updates are available. Any help would be appreciated.
You could try starting visual studio in safe mode by starting it with the /SafeMode command line option. Once open, see if the exceptions are there - changing a setting here may reset the view back when you start Visual Studio normally.
Alternatively, try resetting Visual studio back to its original settings by starting it with the /Setup command line option.

Visual Studio 2008 Blank Tool Window

I have a blank property window that I can not get rid of in Visual Studio 2008 SP1. I have tried every thing to get rid of it.
If I close it it shows right back up after going into debug mode or restarting visual studio. I have tried every thing to fix all the way to reinstalling VS with no luck.
Does any one have a solution for this?
Use the following fix:
Close all instances of Visual Studio Navigate to the following directory (I am using 2008 – for a different version change the 9.0 to reflect the correct version number/folder)
"%userprofile%\Local Settings\Application Data\Microsoft\VisualStudio\9.0".
You should see four files:
toolbox.tbd
toolbox_reset.tbd
toolboxIndex.tbd
toolboxIndex_reset.tbd
Move these files to another folder (or, if you are very brave, delete them altogether. Note, this is very much a case of “Worked on my (colleague’s) PC” – do this at your own risk. Restart Visual Studio and hey presto, your Toolbox should be back to where it needs to be. The user in question did not have any custom items in his toolbox so I can only assume that the fix reverted the toolbox to the original Visual Studio state.
Click Window, Reset Window Layouts.
If that doesn't help, click Tools, Import and Export Settings, Reset all settings. (But backup your current settings)
One thing to try is via the Visual Studio 2008 command line you can run the following command.
devenv /resetsettings
This will restore to factory settings, this could clear up the issue, re-install wouldn't do this for you.

Resources