Pycharm 简明教程
Pycharm - Debugging and Breakpoints
运行 Python 代码包含两种模式:运行脚本和调试脚本。本章重点介绍使用 PyCharm 调试 Python 脚本。
Running a python code comprises of two modes: running a script and debugging the script. This chapter focusses on debugging the Python script using PyCharm.
Steps Involved
调试 Python 项目的步骤如下所述 −
The steps for debugging the Python project are as explained below −
Step 1
首先按照以下屏幕截图所示调试 Python 项目 −
Start with debugging the Python project as shown in the screenshot below −

Understanding Breakpoints
在调试特定脚本时,故意创建一个断点。断点是有意停止的地方或代码暂停的地方,以便识别特定阶段的输出。
While debugging a particular script, it is intentional to create a breakpoint. Breakpoints are intentional stopping place or the place where the code is paused in order to identify the output at specific stage.

在 PyCharm 中,断点使用指定编辑器中的一个单独对话框可见。它包含各种属性来评估定义的断点并跟踪日志,其主要目的是实现更好的编程实践。
In PyCharm, breakpoints are visible using a separate dialog in the specified editor. It includes various attributes to evaluate the breakpoints defined and tracing log for the same with a main motive to achieve better programming practice.