[Python] vscode, python - step through code being 'exec'ed

Discussão em 'Python' iniciado por Stack, Janeiro 12, 2025.

  1. Stack

    Stack Membro Participativo

    So I have a python app that reads/loads a file that is sort of like a plugin for the main application.

    I would really like to be able to debug (step into) the code from VSCODE - which I'm using as an IDE

    I've tried a number of things, described here (and related posts)

    How to debug python code running inside exec()

    These are not working.. I do end up in the pub shell in the terminal window, but that is not really what I was hoping for.

    Why? What I have is a large directory (forest) of various data directories. Each subdirectory contains a body of data, and I want to have a "customization script" - that I can execute for that subdirectory. Sort of like a PLUGIN of sorts

    So I get to the point where I have the name of the file, I can read the file and I want to "exec()" the contents (string) of that file, and I really want to step into the script being executed.

    how can I do this?

    Continue reading...

Compartilhe esta Página