Search code examples
pythonpysidecx-freeze

cx_freeze - how debug app


I have small Python3 application for manipulating some specific XML files. For gui I am using PySide and for parsing files -lxml.

I had some troubles with freezing it with cx_freeze but finally succeed. Now - some parts of application simply don't work... no error message & no log created. For example on Enter press signal in LineEdit - new dialog should be shown... but nothing happens.

I have same version in standard python files and those are running correctly. How do I debug the frozen application?


Solution

  • One way that worked for me is to implement some standard Python logging (see eg. here). By regularly logging some DEBUG messages, you get an indication of where the problem occurs. If there are specific parts of the code that don't seem to work, wrap them in a try/except block and log the exception: The log will then give you the exact error message.