Enable the display of line numbers in Visual Studi

2019-01-31 02:11发布

Why doesn't Visual Studio have any way of showing line numbers in a source file? Is there any way to enable it, or a plugin for it? I know that the number of lines of code in a program doesn't matter, but sometimes it is nice to know how long a program is or the number of a particular line for reference.

Though I tried, I can't seem to find a way to enable line numbering and I find that surprising.

This is Visual Studio 2010 Ultimate. (If you have read my older questions, I've been using 2008 Express until now.)

15条回答
Juvenile、少年°
2楼-- · 2019-01-31 02:48

As of Visual Studio 2015, you can find the option under:

Tools-> Options -> Text Editor -> All Languages-> General -> Line Numbers

Visual Studio 2013 Line Numbers Option Menu


Or simply go to tools -> options and type on the search bar: "Numbers".

查看更多
Luminary・发光体
3楼-- · 2019-01-31 02:48

Visual studio 2015 enterprice

Tools -> Options -> Text Editor -> All Languages -> check Line Numbers

https://msdn.microsoft.com/en-us/library/ms165340.aspxenter image description here

查看更多
爷、活的狠高调
4楼-- · 2019-01-31 02:51

Are you talking about seeing the line numbers or knowing the total number of lines in a project? Here is the 1st one

查看更多
贼婆χ
5楼-- · 2019-01-31 02:54

Visual Studio has line numbering:

Tools -> Options -> Text Editor -> All Languages -> check the "Line numbers" checkbox.

查看更多
干净又极端
6楼-- · 2019-01-31 02:54

Type 'line numbers' into the Quick Launch textbox (top right VS 2015), and it'll take you right where you need to be (tick Line Numbers checkbox).

查看更多
孤傲高冷的网名
7楼-- · 2019-01-31 02:55

Options -> Text Editor -> All Languages -> Line Number checkbox enter image description here

查看更多
登录 后发表回答