Display line numbers in Visual Studio [Works for all Versions]

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 show line numbers in Visual Studio.

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?
Show Line Numbers in Eclipse IDE

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.

Being a developer, I personally use the Visual Studio for my C++ development activities and if you are a developer also, showing the line numbers in VS will add efficiency to your coding and debugging.

The above steps for showing line numbers in Visual Studio works with all versions available i.e. professional, enterprise, and community in all the platforms like Windows, Linux, and Mac with minor changes in the way you find the options.

Visual Studio is a powerful code editor meant for more than ten language support. The VS supports UI languages not limited to HTML, CSS, JavaScript, PHP etc. including the common languages such as C++. C#, ASP.net. The IDE has the capability to integrate multiple extensions to have more advanced features that make developer’s life easy.

Check-out the download page of Visual Studio for different versions available. Out of all versions available, only the community edition is free and other versions are paid. You can try out the trial version of professional versions for more advanced and powerful features.

Happy learning 🙂

Please follow and like us:

Leave a Comment

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

Scroll to Top