None of the above worked for me, because I am using the Jupyter Notebook debugger.
If you are facing the same problem when debugging a cell in a notebook, try the following :
1. Add PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT=10
(10 or any number) to your .env file in your project root
2. Add "python.envFile": "${workspaceFolder}/.env"
in your .vscode/settings.json
3. Test that the new value of the parameter is taken into account in jupyter notebook debugger by running the following in a cell :
import os
import sys
print("Python:", sys.executable)
print("PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT:", os.environ.get("PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT"))
The path should be the one to the kernel indicated at the top right corner of the file window in VS code. The second print should return the value you indicated in the .env file (and not "None")