lanza
lanza

Reputation: 1632

Using Xcode's lldb to debug development lldb

I'm working on something in lldb itself and would like to be able to debug it within Xcode's GUI. While the CLI is functional, the amount of frame hopping I'm doing makes it a waste of time to not use a GUI.

When I run lldb-tool it just halts at Waiting to attach to lldb : lldb tool and then eventually times out.

Also would be glad to learn about another solid lldb GUI on macOS if one exists.

Upvotes: 1

Views: 673

Answers (1)

Jim Ingham
Jim Ingham

Reputation: 27110

I generally like to run lldb in its own Terminal window - Xcode's console is not a great terminal emulator and lldb/editline use enough terminal tricks that it gets confused. So I just start lldb in Terminal and attach to it with Debug->Attach to Process. I also find it easier because I can drive lldb to the point I want to investigate without my breakpoints getting in the way, then attach and start debugging.

Some other folks set the Wait For Executable To Be Launched option in the Run Scheme's Info tab. Then you just hit Debug in Xcode and go launch lldb in a Terminal window.

Upvotes: 2

Related Questions