Since I am trying to open a Python console visibly for debugging, every time a bug is produced from within Python side, the Python console is terminated, leaving the daemon within Matlab waiting forever. The problem is that the Python console is terminated almost immediately, giving us no time to analyze the errors.
So far, I have to use a screen recorder to capture the error. I tried improvising by removing the terminate_daemon within the source code, but it did not work.