【问题标题】:Pycharm python debugger cannot run files containing relative importPycharm python调试器无法运行包含相对导入的文件
【发布时间】:2021-07-14 19:35:28
【问题描述】:

我尝试将包含要调试的文件的文件夹标记为Source root,但未成功。

[Pycharm链接]https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010615139-python-debugger-does-not-work-with-files-containing-relative-import

以下是我的调试配置:

我使用的是 Pycharm 2021.1(专业版)

【问题讨论】:

    标签: python debugging pycharm relative-import


    【解决方案1】:

    您需要将工作目录下拉菜单更改为 .../pythonProject。现在你的工作目录是 timeserio/batches/chunked 里面没有 temeserio 包。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-13
      • 1970-01-01
      • 1970-01-01
      • 2020-10-02
      • 2018-12-03
      • 2018-02-07
      • 1970-01-01
      • 2014-06-01
      相关资源
      最近更新 更多