error:Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))
GitHub的回应是:Debugger not working on apple silicon
解决:
安装CodeLLDB
launch.json里修改type
"type": "lldb"
出处:c++ - VSCode LLDB on MacOS error when starting debugging session - Stack Overflow
vscode 运行C、C++网上很多教程,要配置json,比较繁琐,如果要debug确实得配。但如果只是想抓个代码运行玩玩,可以偷懒,安装Code Runner即可。