I was wondering how to debug python script without adding pdb module to the script file. Say, I have a script test.py without adding "import pdb" and "pdb.set_trace()". Can I debug it in Python running in terminal by importing pdb there? How to set up breakpoints and start the debugging. I tried it this way in Python running in the terminal:
import pdb pdb.break test.py: 9 pdb.run('test.py')
But there will be an error
File "<stdin>", line 1
pdb.break test.py: 9
SyntaxError: invalid syntax
I know I am wrong. Please tell me how to do correctly. Really appreciate your help!