PyCharm 能列出项目中所有的 Python 错误吗?

我在虚拟环境中使用 python 2.7和 PyCharm 2.7(2013年2月7日的新版本)。

每当我打开一个有明确错误的 python 文件(相当于其他语言中的编译错误,例如使用未声明的变量,调用不存在的函数) ,它都会在文件的边缘显示红色条纹。

因此,当我碰巧导航到包含错误的文件时,我会随机发现错误。我真正想要的是能够在一个单独的窗口中列出所有的 python 错误。Visual Studio 2005/2008/2010/... IDE 有一个单独的“错误”视图,其中列出了所有这些错误的文件名和行号,让我能够点击这些错误中的任何一个,然后直接导航到源代码。

PyCharm 有类似的东西吗?

26018 次浏览

You can call Code|Inspect Code (formerly Analyze|Inspect Code, thanks to @CrackerJack9) to get all errors and warnings and ways to fix them. In result panel you can choose to see only errors (red/yellow button at the left side).

Yes, run Analyze|Inspect Code and specify Whole project as the scope of analysis.

In Pycharm 2.6.3:
Code -> Inspect Code