我正在尝试在 vs 代码(mac os big sur)中使用调试器,但没有成功。我在 m1 macbook air 上。vs 代码内部人员版本。我已经尝试过所有这些 python 解释器:
3.9.6 - /opt/homebrew/bin/python3 3.9.1 - /usr/local/bin/python3 3.8.2 - /usr/bin/python3 2.7.16 - /usr/bin/python
我试过这个launch.json文件:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
Run Code Online (Sandbox Code Playgroud)
这是我总是得到的错误:
/usr/bin/env /usr/local/bin/python3 /Users/arch0n/.vscode-insiders/extensions/ms-python.python-2021.7.1053846006/pythonFiles/lib/python/debugpy/launcher 50295 -- /Users/arch0n/Desktop/py-w3schools/2.py
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/arch0n/.vscode-insiders/extensions/ms-python.python-2021.7.1053846006/pythonFiles/lib/python/debugpy/__main__.py", line …
Run Code Online (Sandbox Code Playgroud)