- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 119字
- 2021-07-02 14:00:31
Python debugging techniques
To better debug a Python program, various techniques are available. We're going to look at four techniques for Python debugging:
- print() statement: This is the simplest way of knowing what's exactly happening so you can check what has been executed.
- logging: This is like a print statement but with more contextual information so you can understand it fully.
- pdb debugger: This is a commonly used debugging technique. The advantage of using pdb is that you can use pdb from the command line, within an interpreter, and within a program.
- IDE debugger: IDE has an integrated debugger. It allows developers to execute their code and then the developer can inspect while the program executes.
推薦閱讀
- Qt 5 and OpenCV 4 Computer Vision Projects
- ASP.NET Core Essentials
- Mastering Natural Language Processing with Python
- The DevOps 2.4 Toolkit
- R的極客理想:工具篇
- Python機器學習編程與實戰
- OpenCV 4計算機視覺項目實戰(原書第2版)
- Python青少年趣味編程
- C++程序設計
- scikit-learn Cookbook(Second Edition)
- Python大規模機器學習
- Java Web開發教程:基于Struts2+Hibernate+Spring
- Access 2010數據庫教程(微課版)
- Python快速編程入門
- RStudio for R Statistical Computing Cookbook