r/pythontips • • Mar 24 '21

Python3_Specific How to debug in Python?

Please share some tips about the title.

32 Upvotes

38 comments sorted by

View all comments

7

u/Karam2468 Mar 24 '21

What does debugging do anyways? Newbie here. Why and when shoud we use it?

3

u/VeritosCogitos Mar 24 '21 edited Mar 24 '21

Have you used bugged code? Where you expect one result and get another?

Is that what you want to produce?

The more frequently you test your code to make sure it works is better than finishing a project and finding nothing works and need to narrow it down.

Any typo can cause a bug, and sometimes the bug checkers won’t even catch that. My least favorite debugging error is syntax error with no clue where the error takes place lol.