I don't know if I can make the pdb debugger only stop at --Call-- and --Return--

For example, I want to debug a deserialization process, I don’t know the code ahead of time, and I just need all the sequence of function calls. Similar to when I use pdb for single-step debugging, --Call-- and --Return-- will appear when I enter a function or return, and then use w(here) to view the stack trace, but I can’t predict it in advance Breakpoint, is there a way to do something like this.