簡體   English   中英

如何調試python .exe文件(pyinstaller)

[英]How to debug python .exe file (pyinstaller)

我對使用pyinstaller制作Windows程序(.exe文件)感到非常滿意,但是我發現調試階段非常耗時。

我想pyinstaller編譯python代碼,因此如果崩潰將顯示錯誤。

到目前為止,我已經tryexcept

try:
    # My code goes here
except Exception as e:
    print "ERROR:"
    print type(e)     # the exception instance
    print e.args

但這並沒有給我完整的崩潰日志。

嘗試使用traceback模塊,尤其是print_...函數。 另外,嘗試捕獲BaseExceptions ,所有異常都從該異常派生,而有些不是從Exception派生的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM