Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)
Can anyone suggest to me some good tips for debugging python?

1 Answer

0 votes
by (26.4k points)
edited by

Use the PDB module, here insert the pdb.set_trace() and this function will act as a breakpoint.

>>> import pdb

>>> a="a string"

>>> pdb.set_trace()

--Return--

> <stdin>(1)<module>()->None

(Pdb) p a

'a string'

(Pdb)

Want to learn python to get expertise in the concepts of python? Join python certification course and get certified

For more details, do check out the below video tutorial...

Browse Categories

...