在 pycharm 中中断未处理的异常 [英] Break on unhandled exception in pycharm

查看:20
本文介绍了在 pycharm 中中断未处理的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何打破 pycharm 中未处理的异常?根据 .Pycharm 使用 pydevd 作为调试器.

C:Python25python.exe "C:Program FilesJetBrainsPyCharm 1.2.1helperspydevpydevd.py" --client 127.0.0.1 --port 49371 --file C:/用户/morpheus/PycharmProjects/untitled1/main.pypydev 调试器:警告:psyco 不可用于加速(调试器仍将正常工作,但速度稍慢)pydev 调试器:启动连接到 pydev 调试器(版本 105.58)

我可以让它在非 gae 项目上中断,但它不会在 gae 项目上中断.如何解决这个问题?

解决方案

检查文档:

<块引用>

创建异常断点

  1. 在主菜单上,选择运行 |查看断点,或按Ctrl+Shift+F8.
  2. 选择异常断点选项卡.
  3. 点击添加按钮.
  4. 在 Enter Exception Class 对话框中,指定所需的异常从图书馆上课,或从项目,然后单击确定".

Does anyone know how to break on unhandled exceptions in pycharm? per this link it should be possible, although its not breaking for me (build 105.58). Is there some switch I have to turn on to enable this?

EDIT: I did what you suggested, but the debugger is not breaking on unhandled exceptions. Please see the screenshot below, and let me know if I need to do something else.

It seems this is the same issue as breaking on unhandled exceptions in pydev/gae. Pycharm uses pydevd for the debugger.

C:Python25python.exe "C:Program FilesJetBrainsPyCharm 1.2.1helperspydevpydevd.py" --client 127.0.0.1 --port 49371 --file C:/Users/morpheus/PycharmProjects/untitled1/main.py
pydev debugger: warning: psyco not available for speedups (the debugger will still work correctly, but a bit slower)
pydev debugger: starting
Connected to pydev debugger (build 105.58)

I can get it to break on a non-gae project, but it won't break on a gae project. How can this be fixed?

解决方案

Please check the documentation:

To create an exception breakpoint

  1. On the main menu, choose Run | View Breakpoints, or press Ctrl+Shift+F8.
  2. Select the Exception Breakpoints tab.
  3. Click Add button.
  4. In the Enter Exception Class dialog, specify the desired exception class from the library, or from the project, and click OK.

这篇关于在 pycharm 中中断未处理的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆