I'm running Visual Studio Code at MacBook Air (M1, 2020) with Mac OS Big Sur 11.4 (20F71)
and I have the following configuration at launch.json file:
}
"version": "0.2.0",
"configurations": [
{
"name": "clang - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "C/C++: clang build active file"
}
]
}
When I'm trying to debug the following Hello World program:
#include <stdio.h>
int main(){
printf ("Hello World");
return 0;
}
as a result, at the debug console, I'm getting the following:
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 '/hellowolrd' has exited with code 42 (0x0000002a).
Thanks in advance!