问题
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