0

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?
1
  • What Linux distro are you using, maybe this is beyond my knowledge but I use vscode and debugger is perfect. Commented Nov 1, 2020 at 13:17

1 Answer 1

1

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/

Sign up to request clarification or add additional context in comments.

1 Comment

python3 -m pdb script.py just entered the debugging state. But I want the code to be displayed all the time, and there is an arrow pointing to the current line of execution. Just like gdb tui.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.