Visual Studio代码-Python调试-执行时进入外部函数的代码 [英] Visual Studio Code - Python debugging - Step into the code of external functions when executing

查看:191
本文介绍了Visual Studio代码-Python调试-执行时进入外部函数的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python项目中,如何告诉内置的VSCode调试器在执行时进入其他库的函数代码?

In a Python project, how do you tell the built-in VSCode debugger to step into the code of functions from other libraries on execution?

我知道这是通过添加

"debugOptions": ["DebugStdLib"]

launch.json 中指定的配置此处,但是似乎无法强制调试器进入非标准模块的代码,例如您拥有的模块自己编写并导入到当前文件中。

to your configuration in launch.json as specified here, however it does not seem to be possible to force the debugger to step into the code of non-standard modules, such as the ones you have written yourself and imported into the current file.

推荐答案

为了改善约翰·史密斯的公认答案,值得一提的是现在,该选项已再次重命名。新选项是

In order to improve the accepted answer by John Smith, it is worth mentioning that now the option has been renamed again. The new option is

"justMyCode": false

并按照文档


如果省略或设置为True(默认值),仅将调试限制为
用户编写的代码。设置为False还可以启用
标准库函数的调试。

When omitted or set to True (the default), restricts debugging to user-written code only. Set to False to also enable debugging of standard library functions.

这篇关于Visual Studio代码-Python调试-执行时进入外部函数的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆