Recently ,My Visual Studios Code can't run in "Start Debugging" ,but it can run in "Run Without Debugging" .
The error message show it can't find the _thread module . The _thread module is in Python3 , I think the debugging mode using the Python3 configuration ,but I can't find where I can setting the debugging configuration
How should I do any setting to make my debugging can work ?
Below is my error message:
(venv) linlowa@linlowa-MacBook-Pro lab01 % cd /Users/linlowa/Documents/company/python_lab/lab01 ; /usr/bin/env /Users/li
nzeyu/Documents/company/python_lab/lab01/venv/bin/python /Users/linlowa/.vscode/extensions/ms-python.python-2022.4.0/pythonFi
les/lib/python/debugpy/launcher 55883 -- /Users/linlowa/Documents/company/python_lab/lab01/lab01.py linlowa
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/linlowa/.vscode/extensions/ms-python.python-2022.4.0/pythonFiles/lib/python/debugpy/__main__.py", line 43, in <module>
from debugpy.server import cli
File "/Users/linlowa/.vscode/extensions/ms-python.python-2022.4.0/pythonFiles/lib/python/debugpy/../debugpy/server/__init__.py", line 9, in <module>
import debugpy._vendored.force_pydevd # noqa
File "/Users/linlowa/.vscode/extensions/ms-python.python-2022.4.0/pythonFiles/lib/python/debugpy/../debugpy/_vendored/force_pydevd.py", line 37, in <module>
pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/linlowa/.vscode/extensions/ms-python.python-2022.4.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py", line 362, in <module>
from _pydev_bundle._pydev_saved_modules import thread, threading
File "/Users/linlowa/.vscode/extensions/ms-python.python-2022.4.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py", line 94, in <module>
import _thread as thread; verify_shadowed.check(thread, ['start_new_thread', 'start_new', 'allocate_lock'])
ImportError: No module named _thread


launch.jsonandsettings.jsonfilelaunch.json{ "version": "0.2.0", "configurations": [ { "name": "Python: 目前檔案", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal" ,"args": ["linlowa"] } ] }setting.json{ "python.formatting.provider": "autopep8" }