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

前端 未结 6 476
暖寄归人
暖寄归人 2021-01-02 05:34

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. How

相关标签:
6条回答
  • 2021-01-02 06:10

    I created a .llbdbinit file just like you and reproduced your problem in my copy of Xcode 4.1. I can't get aliases to work either.

    Since ~/.lldbinit is documented by Apple as supposedly being read when started up, I suspect that lldbinit file reading is currently busted in shipping versions of Xcode 4. Not sure what pre-release versions are doing, but I'd recommend filing a bug at bugreporter.apple.com.

    p.s.

    One thing I noticed on one blog (here; look in the "differences between OSX & iOS" section) is that lldb only works for MacOS and NOT for iOS, at least as of a bunch of months ago.

    0 讨论(0)
  • 2021-01-02 06:11

    I had the same problem when trying to get this plugin to work.

    command script import ~/Documents/002.ME/001.BITBUCKET_REPO/xcode_plugin_lldb_quicklook/GITHUB-LLDB-QuickLook/LLDB-QuickLook/lldb_quick_look.py
    command alias ql quicklook
    

    The path to the py file was wrong so kept reporting the error:

    error: 'ql' is not a valid command.

    Once I fixed it. I had to restart Xcode 5 and it worked.

    I didn't have to restart Mac.

    I didn't have to make the file executable.

    0 讨论(0)
  • 2021-01-02 06:18

    Note that ~/.lldbinit does work in Xcode 4.3.2, iOS.

    0 讨论(0)
  • 2021-01-02 06:18

    if you created the lldbinit file with some editor then it might have screwed it. try openning the lldbinit file with vi and check if it just plain text

    0 讨论(0)
  • 2021-01-02 06:21

    Make the file executable:

    chmod +x ~/.lldbinit
    
    0 讨论(0)
  • 2021-01-02 06:31

    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.

    0 讨论(0)
提交回复
热议问题