Debugging using macOS lldb instead of gdb

Since gdb does not work on M1 I would be interested in this too. Any progress?

P.S. Just used lldb as debugger and that worked a charm (unlike gdb on my old Intel which caused a hang). All I did was to add a config to launch.json like

    {
        "name": "(lldb) Starten",
        "type": "cppdbg",
        "request": "launch",
        "program": "<mypath>/PlatformIO/Projects/LLDB/.pio/build/native/program",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${fileDirname}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "lldb"
    },

where <mypath> is somewhere in my Documents folder.

P.P.S. Also it seemed to be a good idea to add something like

build_flags = 
  -g 

to the environment since although it debugged, some locations were weird and symbols not shown as debug info was not complete.

1 Like