- 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.
推薦閱讀
- 編程的修煉
- Vue.js 2 and Bootstrap 4 Web Development
- Building a RESTful Web Service with Spring
- 大數據分析與應用實戰:統計機器學習之數據導向編程
- Getting Started with React Native
- 深度探索Go語言:對象模型與runtime的原理特性及應用
- 硬件產品設計與開發:從原型到交付
- 算法設計與分析:基于C++編程語言的描述
- JavaScript Unit Testing
- INSTANT Lift Web Applications How-to
- 深入淺出Python機器學習
- Django By Example
- Unreal Engine Game Development Blueprints
- PostgreSQL 9 High Availability Cookbook
- C語言程序設計案例教程(第3版)