Display line numbers in Visual Studio

If you are using any version of Visual Studio, then it will be really helpful to display line numbers in Visual Studio while coding and debugging especially.

Here are the steps to display line numbers in Visual Studio.

  1. Go to Tools → Options…
    Tools Options menu in Visual Studio
  2. Look for the Text Editor → All Languages option.
    Check the Line numbers option under the Display section
    Display Line Numbers in Visual Studio for All Languages

This will show line numbers for all types of languages.

Some other curious topics to read:
Did you know you can unzip files using Java?
JPG vs JPEG: The difference you probably didn’t know

But, if you want to enable line numbers for a specific language, select the respective language from the list and check the Line numbers box.
In the below example, I am enabling line numbers only for C/C++.
Show Line Numbers in Visual Studio for C C-plus-plus

That’s it. Now, the line numbers appear in each file in the Visual Studio project/solution.

Happy learning 🙂

Please follow and like us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top