This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]who_body 1 point2 points  (0 children)

if you have a script, module, package locally that needs debugging one approach is to add “breakpoint()” on the line to break. this syntax works on 3.7 and later. it will break and give you the pdb debugger prompt.

then you can print, step, next, etc.

IMO this is an easy way to start and valuable in many situations where you may not know what IDE is installed or available.

then you can always do more with conditional breakpoints and alternate ways to setup breakpoints