Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLDB does not appear to be reading my .lldbinit file on startup

I have a file ~/.lldbinit with a single alias:

command alias pi print (int)

But when I run my app from Xcode, the alias does not work. However, if I manually enter the alias, then the alias does work:

(lldb) pi 6
error: 'pi' is not a valid command.
(lldb) command alias pi print (int)
(lldb) pi 6
(int) $3 = 6
(lldb) 

This leads me to suspect that my .lldbinit file is not getting read. Or is there a different problem that I am missing? Can anyone help?

like image 533
William Jockusch Avatar asked Oct 07 '11 15:10

William Jockusch


People also ask

How do I run an LLDB program?

Loading a Program into lldb First we need to set the program to debug. As with gdb, you can start lldb and specify the file you wish to debug on the command line: $ lldb /Projects/Sketch/build/Debug/Sketch. app Current executable set to '/Projects/Sketch/build/Debug/Sketch.

Where is Lldbinit located?

lldbinit file located in the home directory. Note that it is a hidden file, if you can't see the file, you can use the following shortcut to show the hidden files in your finder: shift + command + .

What does LLDB mean in Xcode?

Xcode uses the LLDB as the default debugging tool. The full form of LLDB is Low-level debugger. Breakpoints help a developer to stop the execution of the program at any point. Stopping the execution of the program at any point helps to know the current state of that program and its properties.


1 Answers

I had a similar problem. It turned out, that I had a syntax error in my .lldbinit file which leads to lldb silently ignoring the file. You can try manually loading the file with

command source ~/.lldbinit

which will show syntax errors.

like image 61
MatzeBraun Avatar answered Oct 13 '22 23:10

MatzeBraun