How to monitor running Python script

Currently I have python scripts running either on Ignition (majority), vsc, docker or exe file.

Most of the scripts are coded for particular purpose, it does the job once the script is done. But some of the scripts need constant monitoring. For this kind of code, I have them mostly in ignition and added either log function or mapped to ignition tags for the status monitoring.

In ignition, I need to create logger function or write to ignition tags for monitor, it works ok but time consuming. In VSC, I can use trace function or print function, but still, it's not as convenient at the PLC software monitoring functions.

Just look out to see any better ways to monitor the running python scripts, basically the script is running like a PLC code, trigger every 1 sec, there's selection logic in it that I need to have real time monitoring how the logic runs and which path it goes after the selection logic, and what the values are.

Any suggestions are appreciated.

Still looking for a solution to it.

some interesting links related: