V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Suger828
V2EX  ›  程序员

发现 Python debug 有个问题

  •  
  •   Suger828 · Jun 19, 2025 · 1667 views
    This topic created in 314 days ago, the information mentioned may be changed or developed.

    如果有个程序文件名称是 queue.py 放到第三方库就 debug 不到 类如有个文件 queue.py 你放到一个第三方库

    def hello():
        print("hello world")
    

    打个断点 然后自己工作目录 debug 调用,结果不会再断点暂停,如果 queue.py 改个名称 就能再断点暂停

    voyagerth1
        1
    voyagerth1  
       Jun 19, 2025
    跟标准库冲突了
    Suger828
        2
    Suger828  
    OP
       Jun 19, 2025 via Android
    @voyagerth1 运行可以运行
    duzhuo
        3
    duzhuo  
       Jun 19, 2025
    py 居然是个域名
    SmiteChow
        4
    SmiteChow  
       Jun 20, 2025
    python 标准库里面的 pdb 没有这个问题,你用的社区的第三方调试工具吧(比如 pycharm 的 pydev )
    julyclyde
        5
    julyclyde  
       Jun 20, 2025
    @Suger828 可以运行,那就意味着你没办法调用标准库了
    wyntalgeer
        6
    wyntalgeer  
       Jun 20, 2025
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5632 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 02:45 · PVG 10:45 · LAX 19:45 · JFK 22:45
    ♥ Do have faith in what you're doing.