0

Say, my script runs on server and has failed at some moment of time.

Except for the error messages in the logs - I would like to have some image file on server side - representing the state of python process in the moment of failure.

I would be able then to move it to my local machine, load into debugger, examine the call stack and what data in what function did really cause the exception.

Is there a way to do that?

lithuak
  • 6,028
  • 9
  • 42
  • 54
  • AFAIK, there is no python facility to do this. You could use `gcore` or equivalent to generate a core dump (see https://stackoverflow.com/questions/68160), by then you would need to debug the Python coredump using gdb ... which is not easy. – Stephen C May 07 '22 at 05:48
  • A better idea would be to attach a remote debugger; see https://stackoverflow.com/questions/35744587/how-to-remote-debug-in-pycharm for instance. – Stephen C May 07 '22 at 05:50

0 Answers0