Skip to main content

Debugging with MacOS

System dependencies

  • Catalina+
  • LLDB 11.0+ (Xcode self-contained)
  • GDB 10.2 (by andb-gdb)

Debugging with XCode's built-in lldb

The lldb that comes with xcode can be installed, no additional installation is required.

Debug with precompiled andb-gdb

The default gdb in the brew repository is only suitable for the Corefile of the MacOS platform. To debug the Corefile of the Linux platform, you need to recompile, or use the andb precompiled version. andb-gdb is a multi-platform precompiled gdb tool, the current version is 10.2.

$git clone

# Also need to add the gdb environment variable
$cd andb-gdb

Configuration tool

Clone the andb repository

git clone

Add the andb environment variable

$cd andb
andb loader enabled, please use 'andb' command to start debugging.

Use andb to check the paths used

[zlei@IntelMac andb]$ andb

General debugging

Debug with gdb and load the file.

andb -l -c

Debug with lldb and load the file.

andb -g -c core.<pid>

Manual tuning method

When debugging core files of unofficial distributions, manual debugging methods are required. At this time, the following files need to be prepared and placed in the same directory.

  • Companion binaries, such as node, must be paired with the file.
  • The supporting node.typ file can also directly use the same version of the node.typ file as the official release.
  • file
# debug with gdb
andb -g node -c

# or debug with lldb
andb -l node -c