在pycharm中打开未处理的异常

2024-04-27 05:52:32 发布

您现在位置:Python中文网/ 问答频道 /正文

有人知道如何打破pycharm中未处理的异常吗?每this link它应该是可能的,尽管它对我来说没有破坏(构建105.58)。有什么开关要打开才能启动吗?

编辑:我按照你的建议做了,但是调试器没有破坏未处理的异常。请看下面的截图,如果我需要做别的事情请告诉我。 enter image description here

看来这和breaking on unhandled exceptions in pydev/gae是同一个问题。Pycharm使用pydevd作为调试器。

C:\Python25\python.exe "C:\Program Files\JetBrains\PyCharm 1.2.1\helpers\pydev\pydevd.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)

我可以让它在非gae项目上中断,但它不会在gae项目上中断。怎么能解决这个问题?


Tags: 项目py编辑onlinkthis事情debugger
2条回答

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 5(至少)上,您可以通过检查“all exception”和“on terminate”使它在未处理的异常上中断。

相关问题 更多 >