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

2019-04-29 15:32:45 +08:00
 1800x
目前,本程序的代码,断点没问题,调试也能进入
但非本程序的就是不行
3475 次点击
所在节点    Python
5 条回复
coffeehat
2019-04-29 15:40:32 +08:00
老版本的 vscode 里,在 launch.json 的某个配置上加入:
"debugStdLib": true
新版本的改用:
"justMyCode": false
coffeehat
2019-04-29 15:43:30 +08:00
上面所指的新版本是 2019 四月更新及其之后的 vscode
1800x
2019-04-29 15:48:43 +08:00
@coffeehat 非常感谢
但这又带来一个问题
外部库每次异常都会暂停
程序启动时 会触发外部库大量的异常——代码不是我写的……
这个怎么解决?
1800x
2019-04-29 15:53:56 +08:00
@coffeehat 已经解决 去掉 bereakpoints 组件的 raised exceptions 勾选即可
再次感谢
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

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/559769

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX