python - Visual Studio Code - Python 调试 - 执行时步入外部函数的代码

标签 python debugging visual-studio-code

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

我知道通过添加一个在标准库中实现的功能是可能的

"debugOptions": ["DebugStdLib"]

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

最佳答案

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

"justMyCode": 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.

关于python - Visual Studio Code - Python 调试 - 执行时步入外部函数的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53594900/

相关文章:

python - 无法使用 pyplot、pandas : _tkinter. TclError 绘制图形:无显示名称且无 $DISPLAY 环境变量

python - 如何在Python中查找不属于样本的值?

python - 添加到列表与增量

Objective-C 和 Cocoa : crash when calling a class function without entering the function

python - VSCode 终端显示不正确的 python 版本和路径,从 anaconda 启动终端工作正常

javascript - 如何在 VS Code 中定义源根目录

python - 如何使用 __init__.py 在 python 中导入包

linux - 无法开始调试。没有可用于启动调试器的终端。请安装 Gnome Terminal 或 XTerm

c++ - 删除一个 char 数组指针会触发一个神秘的断点

linux - Visual Studio Code 智能感知和 includePath