In previous article, I mentioned how to Format Code in Visual Studio (With Indentation)  but in this article, I have mentioned how to show or hide whitespace, tabs, CRLF characters in Visual Studio IDE.

As it is good to display or show Tabs, whitespace etc characters in Visual Studio, while editing or adding code, as some developers prefer to use it, while some not, you can simply Turn it ON or OFF, using Visual Studio Windows Shortcut, CTRL+R , CTRL+W (Toggle showing whitespace, tabs)

You can also go to "Edit -> Advanced -> Select 'View White Space'" to toggle tabs/whitespace.

Here is the sample, when Whitespace, tabs characters are toggled On/OFF in Visual Studio, using GIF image


You can see Tabs and whitespace are visible as "...." in Visual Studio, but once I use shortcut CTRL+R, CTRL+W, "..." are toggled OFF.

In Windows Visual Studio 2010/2013/ 2015, the key sequence CTRL+E, S will also toggle the display of whitespace characters.

In Windows Visual Studio 2019/2022: CTRL+R, CTRL+W

In Visual Studio for Mac, you have to do: Visual Studio -> Preferences -> Text Editor -> Markers and Rulers -> Show invisible characters

And you have to restart Visual Studio for the changes to take effect, for now, but in future, may be VS for mac will resolve this issue and make it work like Windows versions.

You may also like to read:

Visual Studio Version List

Change theme in Visual Studio

Format Code in Visual Studio (With Indentation)

5+ Best Visual Studio Alternatives

Useful Visual Studio Shortcuts (comment, remove comment, Collapse code etc )