If you're having trouble with the Debugger package for Visual Studio and VS Code, check below for information which may help. If something isn't covered here, please file an issue with the information given in Filing an issue.
There are a few known issues in the current version of the debugger:
Multiprocess debugging on a Linux machine requires the spawn
setting. We are working on improving this experience, see #943. Meanwhile do this to improve your debugging experience:
import multiprocessing
multiprocessing.set_start_method('spawn', True)
Note: On Windows, the multiprocessing
package uses "spawn" as the default and only option, so it is recommended for cross-platform code to ensure uniform behavior. If you choose to use spawn
you may have to structure your __main__
module like this https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods.
If you receive an error saying breakpoint not set, then look at your path mappings in launch.json
. See Meta-Issue #2976 for more details.
If you want to debug library files, you have to disable justMyCode
in launch.json
. Previously this setting was debugStdLib
. For example:
{
"name": "Terminal",
"type": "python",
"request": "launch",
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
},
When filing an issue, make sure you do the following: