VS2022 - matching outside brace are not marked in javascript - visual-studio

Visual studio 2022 - I have just installed VS2022 and noticed that outside braces (some nested elements inside) are no longer marked, as it was before.
Example:
But it is still working on non-nested brackets:
And idea why is this happening?

Same issue for me, it stopped work from update to version 4.8.04084 (VS2022 17.4.4). It's a bug in visual studio, before that version it worked normally. Also when braces matching works, in js file is not applied my own set color of highlight.

Related

How to turn off double quotes auto-completion in Visual Studio 2019 for C++ editor?

After updating to version 16.1 of Visual Studio 2019, the code editor for C++ completes double quotation characters. When I type one double quote " it automatically completes it as "".
How to turn this feature off? I tried to look into settings, but could not find in C++ Editors settings or All Languages settings.
Update: it actually only completes when I type wide string literal starting with L. For example, when I type L" it auto-completes it to L""
Update 2: it happens for some .cpp files but not for others. I currently do not see any pattern. Seems like a bug.
Double quote auto-completion is disabled when automatic brace completion is disabled.
You can disable that in the Tools->Options->Text Editor->C/C++->General menu.
As noted in one of the other answers, that option doesn't work properly in some older versions of Visual Studio 2019.
Update October 2019: it is fixed now starting from version 16.3.2. If not, then check your settings carefully.
Short version: This is a bug in Visual Studio, and hopefully will be fixed. You can up-vote it here.
Longer version:
I decided to report this bug to Visual Studio Team, but someone already did that. So if you are affected by this issue, consider up-voting it.
Link to VS bug tracker: Brace completion when member list is up does not put the character in the right position
Note, that while title of above bug may sound like only Code Analysis is affected, VS Team have marked another - more relevant bug as a duplicate to the above bug (C++ automatic quote completion). And it is not possible to vote closed bug, so only option is to vote the first one I mentioned.
I'm using VS 2019 Community Verssion 16.3.9 and have found that when the marker is in the string, the (Ctrl + Shift) combination toggles automatic double-quote placement on and off.

Getting TypeScript in Visual Studio 2015 to auto-complete on enter and auto-complete paranthesies

I just started using TypeScript, and was using the TypeScript Playground here: https://www.typescriptlang.org/play/index.html
It has decent intellisense, and autocompletes on enter, as well as auto-completes parenthesis and brackets.
However, once I decided to use it in VS 2015, I noticed that enter no longer selects the suggested dropdown, and neither parenthesis nor brackets are auto-added. When programming in C#, these features work out great.
How do I enable this behavior in Visual Studio? I would assume that if it exists on the website, it would definitely exist in a full blown IDE like VS.
Can I enable similar refactoring features to C#, like automatic variable/property renaming across the project if I change a variable name? Using Ctrl-R Ctrl-R to rename a variable doesn't seem to work, it only changes the line I'm on.
Edit:
VS 2015 Update 3
Typescript for VS 2015 v 1.8.6.0
Typescript for VS 2015 v 2.0
Edit2: Upgraded to the TS 2.0 VS plugin. The Automatic Brace Completion checkbox is no longer greyed out, yet enabling it does not seem to have an effect on brace completion.
Edit3: These features are in Visual Studio Code.
TypeScript 2.0.2 RC for Visual Studio 2015 — August 30, 2016 fixed this issue. You can download here.
Click Details to see list of all the versions.
Make sure you have the latest TypeScript VS extension installed.

ReSharper TypeScript seems to be not working at all in my VS 2015 installation

ReSharper TypeScript seems to be not working at all in my VS 2015 installation. Despite of the correctly placed TypeScript definitions ReSharper does not recognize the defined types, gives zillion red underlines, and of course intellisense does not work on the variables.
The error message is for example: Could not find symbol 'JQuery'
Some more diagnostics:
Compiling the project in VS 2015 compiles with no error. Making an intentional error in the source then build generates one correct error message
Intentionally making a spell in the type definition file paths, it underlined with red correctly. When correcting the path, underline diasppears
Opening the very same project in VS 2013 all works like a charm, ReSharper is working correctly
Originally used ReSharper 9.1.2 this issue was there. Now upgraded to the latest 9.1.3 and the issue remained.
Any ideas?
If you see this kind of behaviour - lots of red, but clean compile, especially after an upgrade - you should try to clean the caches. Go to ReSharper → Options → General → Clean caches, then restart Visual Studio.
Since the problem occurs in more than one version including latest as of writing, you also have the option to switch off TypeScript support in ReSharper. After all, if a feature is broken, why use it?
How to switch it off according to their web site:
If necessary, you can disable/enable ReSharper features in TypeScript
files by clearing the corresponding check box on the Environment |
Products & Feature page of ReSharper options.
Source: JetBrains help page for ReSharper (retrieved 29 March 2018)
After this change you may have to restart Visual Studio for the new settings to take effect.
I have found that sometimes, the Visual Studio Project file is corrupted, containing multiple references to .ts files. This can cause a different, but related error, where ReSharper thinks there are multiple declarations of a symbol.
To resolve, if you are using version control, it is simple.
Make a commit
Delete the folder containing the duplicated files
Revert changes to the repository
Add the folder back to Visual Studio
Save the project file
As I mentioned, this doesn't solve the original problem, but can help in situations where ReSharper reports duplicate symbols.

Visual Studio 2013 + Typescript + Web Essentials = no auto closing braces

I've installed Web Essentials for VS 2013 Update 2 and I am not getting auto closing braces (and auto closing parentheses) on Typescript files.
From what I read on some forums (link to forum), it does exist and should be available. Is there a way to enable it?
Thanks!
ps: for JS files everything is working as expected.
It seems that the Tools->Options->Text Editor->TypeScript->Automatic brace completion option (which controls this feature) is disabled.
You can manually enable this option by adding the following DWORD registry value (set it to 1):
HKCU\Software\Microsoft\VisualStudio\12.0_Config\Languages\Language Services\TypeScript\ShowBraceCompletion
Once it's enabled (restart VS to see the change), you can go into the options and check it off. Hopefully that's enough to make it start working (if there really is already support for brace completion in TypeScript). Update: It seems this still doesn't enable brace completion -- it looks like the TypeScript language service itself simply doesn't support it (in VS2013 Update 2 anyway, which is what I tried it on -- but note that I don't have WebEssentials installed).
Note that this is more of a hack than a proper fix, since Visual Studio can reconstruct the 12.0_Config key any time it likes (this happens when you install/uninstall/enable/disable an extension, for example). A more permanent patch is to create a small Visual Studio extension with a .pkgdef file that sets that registry value (when the 12.0_Config key is reconstructed, it looks at all the .pkgdefs to see what it should put there).
There is an extension here that will add brackets automatically: https://visualstudiogallery.msdn.microsoft.com/0e33cb22-d4ac-4f5a-902f-aff5177cc94d

Breakpoints are not highlighting the entire line in Visual Studio 2013

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.

Resources