title: VSCode LLDB on MacOS error when starting debugging session
body: <p>I'm trying to configure VSCode for compiling/debugging C++ programs on MacOS. I am using the following launch.json file:</p>
  <p><a href="https://i.stack.imgur.com/GKM2L.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GKM2L.png" alt="enter image description here" /></a></p>
  <p>When I try and start a debugging session, I get the following error:</p>
  <pre><code>Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
  ERROR: Unable to start debugging. Unexpected LLDB output from command &quot;-exec-run&quot;. 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).
  </code></pre>
  <p>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.</p>
  <p>I can't seem to find any reference to this error anywhere online, does anyone know how I can solve this?</p>
  <p>Edit: Adding &quot;targetArchitecture&quot;: &quot;ARM64&quot; removed the warning, but does not fix the error.</p>