V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Edwards
V2EX  ›  Python

请教个问题, pycharm 断点调试

  •  
  •   Edwards · 2018-07-24 16:25:05 +08:00 · 2650 次点击
    这是一个创建于 2102 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天调试一段代码,打了断点,debug 运行的时候,发现不进断点,是我姿势不对么?请教正确姿势

    4 条回复    2018-07-26 14:03:25 +08:00
    saulshao
        1
    saulshao  
       2018-07-24 17:38:32 +08:00
    你...如果你别的断点能进去,只有一种可能:你的整个过程就没有执行断点部分的代码......
    hongyanfoxin
        2
    hongyanfoxin  
       2018-07-24 18:00:13 +08:00 via Android
    #1 说的可能性最大,特别是在循环内部的断点。还有两种可能性,一种是你打开了两个同名文件,一种是你设置了断点条件,不满足断点条件的情况下也不会停。
    Edwards
        3
    Edwards  
    OP
       2018-07-24 20:40:12 +08:00 via Android
    @saulshao 我在 if else 这两个地方打的断点。然后 debug 怎么都不进断点。我确定代码已经执行了。
    KeatingSmith
        4
    KeatingSmith  
       2018-07-26 14:03:25 +08:00
    上动态图

    要么就是没执行到断点的位置。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4787 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:52 · PVG 17:52 · LAX 02:52 · JFK 05:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.