VSCode LLDB on MacOS error when starting debugging session

1

I'm trying to configure VSCode for compiling/debugging C++ programs on MacOS. I am using the following launch.json file:

enter image description here

When I try and start a debugging session, I get the following error:

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).

It is worth mentioning that I am using an M1 Macbook, so x86_64 is not the correct architecture. I'm assuming that this is the reason for the error.

I can't seem to find any reference to this error anywhere online, does anyone know how I can solve this?

Edit: Adding "targetArchitecture": "ARM64" removed the warning, but does not fix the error.

c++
visual-studio-code
lldb
vscode-debugger
asked on Stack Overflow Apr 26, 2021 by Jr795 • edited Apr 26, 2021 by Jr795

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0