Project specific .lldbinit in current working directory not read by Xcode
This is the working directory in which you launch whatever process loads the LLDB framework. Xcode doesn't have a useful working directory (it was /
last time I looked), so you can't really use the cwd version.
A solution for Xcode project specific lldb settings that will work in many cases is to put a symbolic breakpoint on main, set it to auto-continue, then put the settings you want in the breakpoint commands of that breakpoint.
It would also be great if Xcode had some UI to specify target-specific lldbinit files.
Xcode now (written with the public Xcode 12) has support for setting a scheme-level LLDB Init File
. This can be done as part of the Info tab in the Run phase of the scheme.
- Open project in Xcode.
⌘ + Shift + ,
to open scheme editor.- Select Run then the Info tab.
- Edit
LLDB Init File
value.- Use
$(PROJECT_DIR)
to reference the directory that contains the project. - Use
$(SRCROOT)
to reference the target's source root directory.
- Use