【发布时间】:2021-07-20 01:14:48
【问题描述】:
我正在尝试配置 VSCode 以在 MacOS 上编译/调试 C++ 程序。我正在使用以下 launch.json 文件:
当我尝试启动调试会话时,我收到以下错误:
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process
exited with status -1 (attach failed ((os/kern) invalid argument))
The program '/path/to/Development/C++/helloworld/main' has exited with code 42
(0x0000002a).
值得一提的是,我使用的是 M1 Macbook,所以 x86_64 不是正确的架构。我假设这是错误的原因。
我似乎在网上的任何地方都找不到有关此错误的任何参考,有人知道我该如何解决这个问题吗?
编辑:添加 "targetArchitecture": "ARM64" 删除了警告,但没有修复错误。
【问题讨论】:
标签: c++ visual-studio-code lldb vscode-debugger