Cx_freeze - as a debugging application

I have a small Python3 application for managing some specific XML files. For gui, I use PySide and to parse -lxml files.

I had some problems with freezing with cx_freeze, but finally succeeded. Now - some parts of the application just do not work ... there is no error message and no log is created. For example, when you press Enter on a signal in LineEdit, a new dialog should be shown ... but nothing happens.

I have the same version in standard python files and they work correctly. How to debug a frozen application?

+4
source share
2 answers

One of the ways that worked for me is to implement some standard Python protocols (see, for example, here ). By regularly registering DEBUG messages, you get information about where the problem occurs. If there are certain parts of the code that do not seem to work, wrap them in a try / except block and write the exception: then the log will give an exact error message.

+4
source

Take a look at the pyside documentation and see if there is a redirect output for the window parameter - it is possible that something is causing an error that prints nowhere.

0
source

Source: https://habr.com/ru/post/1495887/


All Articles