Pages

Friday, July 25, 2008

Showing Line Numbers in Visual Studio 2008

Today I was looking for a particular place in the code file and found that there are no current line number displayed anywhere in the IDE. :S
The reason was that there was no status bar displayed at all.
Tools -> Options -> Environment -> General -> ShowStatusBar is the option to turn it back on. This has not happened ever since I've been using Visual Studio products. Wasn't even aware that such a thing is possible. :)

Edit: Thanks for the feedback, everyone! I've updated the settings path and the option to enable line numbers in the editor.

If, instead of enabling the status bar, you are looking on how to enable line numbers in the editor window, on the left-hand side, try the following option, as suggested in the comments below:

1. Tools > Options > Text Editor > All Languages > General
2. On the right, under Display section, put tick mark for Line numbers.

22 comments:

Anonymous said...

1. There IS no tools>options>general.
It's tools>options>ENVIRONMENT>general.

2. The status bar is not sufficient to see line numbers. I have this option turned-on but still see no line numbers.


Pfff.

Alen's Australia said...

Thanks for the comment. You are right. It's Tools->Options and then the first option highlighted is Environment-General. The first check box is "Show status bar".

Nonetheless, this was enough for the issue I was having. The point being that I did not change anything manually yet the status bar was completely missing and turning this option brought it back. I did not pay attention to this option ever before.

The issue you are having is that you are missing a panel with the row and column indicators on the statusbar?

మురళీ కృష్ణ said...

Hi,

To display line numbers in the code window (aka. Text Editor) do this ...

1. Tools > Options > Text Editor > All Languages > General

2. On the right, under Display section, put tick mark for Line numbers.

3. Press OK.

Thats all.

Anonymous said...

thanks a lot

Anonymous said...

Thanks a lot for your comments.

talkinrussian said...

thank you!

Raidon said...

I had to unselect then reselect to have the line number show up.

work said...

Thank you, మురళీ కృష్ణ , The Tools > Options > Text Editor > All Languages >

worked for me. Now I can see my line numbers in Visual Studio 2008.

Anonymous said...

thanks a lot , that helped

Anonymous said...

మురళీ కృష్ణ - Thanks for that, have just reinstalled VS 2008

rmx said...

Thank you!
It is SO STUPID that this option doesn't came active from the scratch!

Anonymous said...

It is Tools>Options>TextEditor>C#>General then check Line Numbers. IMPORTANT NOTE: You might not see this option unless in the bottom left corner of the Options windows you check the box labeled "Show all settings".

Anonymous said...

Read here: http://blog.krisvandermast.com/ShowingLineNumbersInVisualStudioNET.aspx

tian said...

thank you

Anonymous said...

Thank you మురళీ కృష్ణ ! That worked wonderfully.

Kim Mogensen said...

Exactly what I was looking for...

Anonymous said...

Thank you, it was driving me crazy, looking all over for this function. I'm graqteful for your information!
KL

rajesh said...

thank you for given important information

Ashu said...

Thnk u ... imp thng is U need to check d "Show all settings" checkbox

Anonymous said...

మురళీ కృష్ణ is right thank you

Anonymous said...

Thanks Quick and easy

Anonymous said...

Very helpful! Thanks!