python - 外部库中的 PyCharm 断点

标签 python django django-rest-framework pycharm

在 PyCharm 中是否可以在外部 python 库中放置断点并单步执行?

对于上下文,我遵循 Django REST 框架快速入门指南:http://www.django-rest-framework.org/tutorial/quickstart/

但是我无法启动应用程序,因为它抛出以下异常:

异常值:
未指定 base_name 参数,并且无法从 View 集中自动确定名称,因为它没有 .queryset 属性。 异常位置:/Users/yongli/code/shopfront/env/lib/python3.4/site-packages/rest_framework/routers.py in get_default_base_name, line 141

我希望能够检查堆栈跟踪并单步执行 Django REST 框架代码以找到问题的根源。

最佳答案

是的,您可以尝试使用尽可能小的步骤。

关于python - 外部库中的 PyCharm 断点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27892719/

相关文章:

python - 设置python rpm的安装路径

django - 在基于类的 View 中设置基于条件的重定向(Django)

python - django rest框架过滤器

使用 through 从 ManyToManyField 进行 Django 序列化

python - Pandas - 如何返回 pandas 数据框中的索引?

javascript - 套接字 : data loss due to socket getting closed due to transport error

python - 为什么我无法使用 "Send_file"从 Flask 发送图像以使用react

django - 如何使用 drf-yasg 在 django-rest-framework 中为文件上传 API 制作 swagger 模式?

django - 为什么 d3 总是附加到正文而不是我的选择?

python - 类型错误 : count() takes at least 1 argument (0 given)