Ant*_*mik 5 python debugging console pycharm
我的 Pycharm 调试控制台有问题。这是我一步一步执行的操作:我在代码中的某个位置设置了一个断点,当代码停在该断点时,我按照此处所述打开调试控制台。这是提示:
>>>
Run Code Online (Sandbox Code Playgroud)
然后我尝试做一些基本的事情,例如a = 1,但我收到
此错误消息(屏幕截图)。作为复制粘贴:
Traceback (most recent call last):
File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 362, in get_interpreter
interpreterInterface = getattr(__builtin__, 'interpreter')
AttributeError: module 'builtins' has no attribute 'interpreter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 1443, in do_it
result = pydevconsole.console_exec(self.thread_id, self.frame_id, self.expression, dbg)
File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 467, in console_exec
need_more = exec_code(CodeFragment(expression), updated_globals, frame.f_locals, dbg)
File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 383, in exec_code
interpreterInterface = get_interpreter()
File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 364, in get_interpreter
Run Code Online (Sandbox Code Playgroud)
当我开始对一个全新的 python 文件执行此操作时,一切正常,但>>> 提示的不是
In[2]:
Run Code Online (Sandbox Code Playgroud)
差异来自哪里?在第一种情况下我可以做什么来使用调试控制台?
mon*_*ano -1
>>>指的是Python控制台,而
In[2]:
Run Code Online (Sandbox Code Playgroud)
是 IPython 控制台,一种类固醇控制台。
有时,奇怪的导入可能会导致一件事崩溃,而不是另一件事。也许你可以检查一下这个。
| 归档时间: |
|
| 查看次数: |
1983 次 |
| 最近记录: |