pycharm调试出现的bug

工作用到Python来写进行从mongodb向mysql迁移的代码,由于业务字段极其复杂,所以需要用到调试

但是调试出了一个一直没有预料到的bug:

Exception ignored in: '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_bytecode_while_frame_eval'
SystemError: error return without exception set

用同事mac电脑的pycharm却可以直接进入debug,而自己的就是进不去断点,所以开始寻找解决方案:

bug描述可以看出是系统问题:

一度以为是自己的程序问题,导致栈溢出等严格问题,后来百度bug,在intellij-support.jetbrains论坛中发现了解决方法:

原文网址如下:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000892280-Unable-to-Debugg

第一步先:

进入设置,选入python debugger

pycharm调试出现的bug_第1张图片

将图中的Gevent  compatible项勾选

然后点击run的下拉框下面的编辑结构,添加两个环境变量

pycharm调试出现的bug_第2张图片

如图所示

之后debug就不会有任何问题了~~~~~

你可能感兴趣的:(python)