In Xcode 3, the line number of the current cursor location was displayed. I don't see this in Xcode 4. Is there a setting that will turn it on? Or a keypress that will give it to me?
Choose Preferences... from the Xcode menu and select the Text Editing tab. We are interested in the Display section. The first option is the option we are looking for, Line numbers. Checking the checkbox displays line numbers in the gutter of the code editor.
Press the Esc key if you are currently in insert or append mode. Press : (the colon). The cursor should reappear at the lower left corner of the screen next to a : prompt. A column of sequential line numbers will then appear at the left side of the screen.
The left-most column in the Code Editor which contains the line numbers is known as the Gutter. Blue arrow-tabs present in the gutter are "breakpoint indicators". Breakpoints are a part of the debugging process that we'll teach you about later. Above: Xcode when encountering a breakpoint.
For Xcode 4 and higher, open the preferences (command+,) and check "Show: Line numbers" in the "Text Editing" section.
Xcode 9
Xcode 8 and below
In Preferences->Text Editing-> Show: Line numbers you can enable the line numbers on the left hand side of the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With