[Python] How to debug python code running inside exec()

Discussão em 'Python' iniciado por Stack, Abril 9, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to debug a plugin code that I'm running inside exec command

    is there a way to debug it somehow? for example:

    code='''
    breakpoint()
    foo=5
    print(foo)
    '''
    exec(code)


    I want to stop before foo is printed, and do list (pdb) command and see the code

    Continue reading...

Compartilhe esta Página