Microsoft Visual Studio: Display Line Numbers in the Text Editor

By default, line numbers are not visible in Microsoft Visual Studio’s Text Editor. This is a disadvantage which may make it difficult for developers to navigate, track, and jump to a specific line in a long script. This tutorial will help you enable this feature easily.

Before I use a new script editor, I always make sure it is set to display line numbers. Although most script editors have this ability, many of them do not enable it by default. Here are the required steps in Microsoft Visual Studio.

1. Launch Microsoft Visual Studio.

2. From the toolbar, choose Tools -> Options.

3. When the Options window pops up on the screen, it will be displayed in minimal mode, with most of the important settings hidden by default. To view all of the settings, check the Show all settings box.

4. From the left side hierarchy, navigate to the Text Editor -> the current language that you are using. In this example, I am using Visual Basic. If you want to enable this option for all languages, choose All Languages.

5. On the right side of the window, find the Display section, and check the Line numbers option.

6. Click the OK button to save the setting.

7. From now on, the Text Editor will display the line number at the beginning of each line.

Before:

After:

 

 

 

About Lê Hoàng

When not creating exciting new Android games, Lê Hoàng is here crafting tutorials, tweaks, and fixes for your enjoyment.
View more articles by Lê Hoàng

The Conversation

Follow the reactions below and share your own thoughts.