推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Va1n3R
V2EX  ›  Python

Pycharm 开发 PyQt5 项目的时候,有异常直接退出怎么破?

  •  
  •   Va1n3R · Nov 3, 2017 · 3041 views
    This topic created in 3249 days ago, the information mentioned may be changed or developed.

    前几天接触了 PYQT5,发现调试特别不方便...遇到了异常直接返回一个地址然后退出..
    想知道除了 Logging,prin,还有断点 debug 之外有没有啥办法啊...

    这是主函数

    if __name__ == '__main__':
        '''
        主函数
        '''
     
        app = QApplication(sys.argv)
        mainWindow = QMainWindow()
        ui = Ui_mainWindow()
        ui.setupUi(mainWindow)
        mainWindow.show()
        sys.exit(app.exec_())
    
    3 replies  •  2017-11-06 12:19:10 +08:00
    cyrbuzz
        1
    cyrbuzz  
    PRO
       Nov 5, 2017
    在命令行运行可以捕获到错误信息。
    dancingbear
        2
    dancingbear  
       Nov 6, 2017
    try catch
    Va1n3R
        3
    Va1n3R  
    OP
       Nov 6, 2017
    @cyrbuzz 这个好用!感谢!!!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2490 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 15:41 · PVG 23:41 · LAX 08:41 · JFK 11:41
    ♥ Do have faith in what you're doing.