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.
- Go to Tools → Options…
- Look for the Text Editor → All Languages option.
Check the Line numbers option under the Display section
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++.
That’s it. Now, the line numbers appear in each file in the Visual Studio project/solution.
Happy learning 🙂