Gerrie
Gerrie

Reputation: 806

Debug python on linux

Use pdb to debug python scripts on Linux.

  1. When using import pdb pdb.set_trace() to breakpoint. Can I open the tui window like gdb, or a similar code window to see the code in real time?
  2. When running to a function, is there a way to let me see where the function is called?

Upvotes: 0

Views: 1330

Answers (1)

blami
blami

Reputation: 7431

Yes you can. TUI command for that is python3 -m pdb script.py and here is good tutorial on how to use it: https://realpython.com/python-debugging-pdb/

Upvotes: 1

Related Questions