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
chenqh
V2EX  ›  Python

关于 vscode debug 的问题

  •  
  •   chenqh · 2018-12-04 13:17:20 +08:00 · 1622 次点击
    这是一个创建于 1941 天前的主题,其中的信息可能已经有所发展或是发生改变。
    from selenium import webdriver
    driver = webdriver.Firefox()
    driver.get("http://python.org")
    driver.close()
    

    然后我在

    driver = webdriver.Firefox()
    

    下断点, 使用默认的"Python Current File(Integrated Terminal)" 做调试, 在driver = webdriver.Firefox() 这行使用单步调试,为什么没有进入到Firefox.__init__这个方法里面,是不是我弄的有问题?

    4 条回复    2018-12-07 00:54:34 +08:00
    hflyf123
        1
    hflyf123  
       2018-12-04 14:40:56 +08:00   ❤️ 1
    你是单步执行还是单步跳过的呢,后者不会进方法体内部
    chenqh
        2
    chenqh  
    OP
       2018-12-04 14:42:02 +08:00
    vonsdite
        3
    vonsdite  
       2018-12-07 00:43:59 +08:00   ❤️ 1
    vscode 适合写小的代码吧,我试了一下,vscode 下按 f11 确实是跳过了, 用 pycharm 就没有这样的问题了。写工程项目还是 pycharm 爽
    chenqh
        4
    chenqh  
    OP
       2018-12-07 00:54:34 +08:00
    @vonsdite 你也这样呀。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   983 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:59 · PVG 05:59 · LAX 14:59 · JFK 17:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.