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
1800x
V2EX  ›  Python

vscode 调试 Python 程序,如何调试进入第三库的代码?

  •  
  •   1800x · 2019-04-29 15:32:45 +08:00 · 3456 次点击
    这是一个创建于 2037 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目前,本程序的代码,断点没问题,调试也能进入
    但非本程序的就是不行
    5 条回复    2019-10-31 20:23:31 +08:00
    coffeehat
        1
    coffeehat  
       2019-04-29 15:40:32 +08:00
    老版本的 vscode 里,在 launch.json 的某个配置上加入:
    "debugStdLib": true
    新版本的改用:
    "justMyCode": false
    coffeehat
        2
    coffeehat  
       2019-04-29 15:43:30 +08:00
    上面所指的新版本是 2019 四月更新及其之后的 vscode
    1800x
        3
    1800x  
    OP
       2019-04-29 15:48:43 +08:00
    @coffeehat 非常感谢
    但这又带来一个问题
    外部库每次异常都会暂停
    程序启动时 会触发外部库大量的异常——代码不是我写的……
    这个怎么解决?
    1800x
        4
    1800x  
    OP
       2019-04-29 15:53:56 +08:00
    @coffeehat 已经解决 去掉 bereakpoints 组件的 raised exceptions 勾选即可
    再次感谢
    qgb
        5
    qgb  
       2019-10-31 20:23:31 +08:00
    Visual Studio Live Share Linux Dependency Installer

    See https://aka.ms/vsls-docs/linux-prerequisites

    Visual Studio Live Share requires a number of prerequisites that this script
    will attempt to install for you. This process requires admin / root access.

    To begin the installation process, your OS will now ask you to enter your
    admin / root (sudo) password.

    [sudo] password for qgb:

    (*) Detected RHL / Fedora / CentOS

    (*) Updating package lists...

    (*) Verifying .NET Core dependencies...
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirrors.cn99.com
    * epel: hk.mirrors.thegigabit.com
    * extras: mirrors.cn99.com
    * updates: mirrors.cn99.com
    getpagespeed-extras-noarch | 27 kB 00:00
    https://extras.getpagespeed.com/redhat/7/noarch/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for getpagespeed-extras-noarch: Damaged repomd.xml file
    Trying other mirror.
    Package 1:openssl-libs-1.0.2k-19.el7.x86_64 already installed and latest version
    Package krb5-libs-1.15.1-37.el7_7.2.x86_64 already installed and latest version
    Package libicu-50.2-3.el7.x86_64 already installed and latest version
    Package zlib-1.2.7-18.el7.x86_64 already installed and latest version
    Nothing to do
    (*) compat-openssl10 not required.

    (*) Verifying keyring dependencies...
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirrors.cn99.com
    * epel: hk.mirrors.thegigabit.com
    * extras: mirrors.cn99.com
    * updates: mirrors.cn99.com
    getpagespeed-extras-noarch | 26 kB 00:01
    https://extras.getpagespeed.com/redhat/7/noarch/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for getpagespeed-extras-noarch: Damaged repomd.xml file
    Trying other mirror.
    Resolving Dependencies
    There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
    --> Running transaction check
    ---> Package gnome-keyring.x86_64 0:3.28.2-1.el7 will be installed
    --> Processing Dependency: /usr/libexec/gcr-ssh-askpass for package: gnome-keyring-3.28.2-1.el7.x86_64
    epel/x86_64/filelists_db | 12 MB 00:01
    https://extras.getpagespeed.com/redhat/7/noarch/repodata/b7cc25a2fc5f548817b09fda0b5d07df8a72e6581229efb7feb7e708a18443f9-filelists.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
    Trying other mirror.
    To address this issue please refer to the below wiki article

    https://wiki.centos.org/yum-errors

    If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



    One of the configured repositories failed (GetPageSpeed packages for Enterprise Linux 7 - noarch),
    and yum doesn't have enough cached data to continue. At this point the only
    safe thing yum can do is fail. There are a few ways to work "fix" this:

    1. Contact the upstream for the repository and get them to fix the problem.

    2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

    3. Run the command with the repository temporarily disabled
    yum --disablerepo=getpagespeed-extras-noarch ...

    4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

    yum-config-manager --disable getpagespeed-extras-noarch
    or
    subscription-manager repos --disable=getpagespeed-extras-noarch

    5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

    yum-config-manager --save --setopt=getpagespeed-extras-noarch.skip_if_unavailable=true

    failure: repodata/b7cc25a2fc5f548817b09fda0b5d07df8a72e6581229efb7feb7e708a18443f9-filelists.sqlite.bz2 from getpagespeed-extras-noarch: [Errno 256] No more mirrors to try.
    https://extras.getpagespeed.com/redhat/7/noarch/repodata/b7cc25a2fc5f548817b09fda0b5d07df8a72e6581229efb7feb7e708a18443f9-filelists.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
    (!) Keyring installation failed!

    Press enter to dismiss this message
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1144 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 18:58 · PVG 02:58 · LAX 10:58 · JFK 13:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.