- 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.
推薦閱讀
- MATLAB圖像處理超級學(xué)習(xí)手冊
- 實戰(zhàn)Java高并發(fā)程序設(shè)計(第3版)
- Mastering Rust
- FLL+WRO樂高機器人競賽教程:機械、巡線與PID
- 算法訓(xùn)練營:提高篇(全彩版)
- Android Native Development Kit Cookbook
- Python:Master the Art of Design Patterns
- 用戶體驗增長:數(shù)字化·智能化·綠色化
- VMware虛擬化技術(shù)
- Learning Docker Networking
- jQuery技術(shù)內(nèi)幕:深入解析jQuery架構(gòu)設(shè)計與實現(xiàn)原理
- Scratch編程入門與算法進(jìn)階(第2版)
- 軟件自動化測試實戰(zhàn)解析:基于Python3編程語言
- OpenCL異構(gòu)并行計算:原理、機制與優(yōu)化實踐
- 零基礎(chǔ)學(xué)西門子PLC編程:入門、提高、應(yīng)用、實例