cclanglldb

reduce lldb output when single-stepping


When I am using lldb to debug a 'c' program (at the command line), I often like to break at a statement, and then single step through the code to see what is happening. With gdb, I can just keep typing 'n', and see the next line. With lldb, every time I type 'n', I see "frame #0", (the values of the variable in the function call), which takes up dozens of lines and makes it very difficult to actually see the program flow (because the stack frame keeps separating each line of code).

Is there a way to turn that off, and simply see the next line of code?


Solution

  • You can turn off the thread info printing with:

    settings set thread-stop-format ""
    

    You can control how many source lines lldb prints on stop with the stop-line-count-before and stop-line-count-after settings, but lldb treats both these values being 0 to mean "don't show line info" so at present the best you can do is the stop line and one line before or after.