[Python] How can I step to use the python debugger to break at every function call?

Discussão em 'Python' iniciado por Stack, Fevereiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    I want to closely monitor the chain of function calls which are called from a certain function.

    import pdb; pdb.set_trace()
    res = api.InsertVideoEntry(video_entry, video)


    I'm looking for a way to easily see that api.insertVideoEntry(video_entry, video) calls foo() which calls bar() which calls baz(),

    Here's a really crude diagram to show what I mean. I don't need it in this form, but this is the kind kind of information I'm looking for.

    api.insertVideoEntry()
    foo()
    bar()
    baz()
    baz2()
    log()
    finish()

    Continue reading...

Compartilhe esta Página