Display line numbers in the editor
You can show or hide line numbers in your code. Here's how.
On the menu bar, select Tools > Options > Text Editor, and then select either the language you're using or All Languages to turn on line numbers in all supported programming languages.
Tip
You can also type line number in the Search box, and then choose Turn line numbers on or off from the results.
Select the Line numbers checkbox to show line numbers, or clear the checkbox to hide line numbers.
Note
Line numbers aren't added to your code; they're just for reference.
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for