About debugging

sir i didnt understand about debugging

2 Likes

@savalisrikanth1997
Debugging is the process of detecting and removing of existing and potential errors (also called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash.

To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or defects.

To start debugging within the program just insert import pdb, pdb. set_trace() commands.
Run your script normally, and execution will stop where we have introduced a breakpoint. So basically we are hard coding a breakpoint on a line below where we call set_trace().

2 Likes