xcode->preferences->text editing->display options->show line numbers 本文转自博客园知识天地的博客,原文链接: XCODE显示行号,如需转载请自行联系原博主。