Visual Studio Code - Python debugging - Step into the code of external functions when executing

岁酱吖の 提交于 2020-06-10 07:43:27

问题


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?

I know it is possible for functions implemented in standard libraries by adding a

"debugOptions": ["DebugStdLib"]

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.


回答1:


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

and as per the documentation

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.




回答2:


A debugger configuration with

"debugOptions": ["DebugStdLib"]

added in launch.json in fact will step into user-defined and pip-installed modules, contrary to what's written in the main question.



来源:https://stackoverflow.com/questions/53594900/visual-studio-code-python-debugging-step-into-the-code-of-external-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!