Reveal LLDB Commands

With the latest release of Reveal (v5), we now provide a set of debugger commands accessible from the LLDB console (including Xcode’s Debug Console). These commands allow you to easily load and control the Reveal Server framework in your current debug session with either the LLDB console command line or breakpoint commands.

Installation

To make the Reveal Server commands available to your debugging sessions, open Reveal’s Help menu and click Install Debugger Commands…

Confirming the installation will add the following lines into your ~/.lldbinit file:

### Reveal LLDB commands support - DO NOT MODIFY
command script import /Applications/Reveal.app/Contents/SharedSupport/Scripts/RevealServerCommands.py
###

The above snippet imports a Python script bundled with Reveal into all your debug sessions. The python script implements functionality required to load, start and stop Reveal Server in the Simulator and on device.

Note that the command directly references your Reveal installation path — if you move Reveal to a different location, Reveal will offer to correct your ~/.lldbinit file on launch.

Removal

To remove the Reveal Server commands from your debugger, open Reveal’s Help menu again and click Remove Debugger Commands… This will remove the snippet previously inserted in your ~/.lldbinit file.

Available commands

The easiest way to take advantage of the Reveal Server debugger commands is to follow the instructions in our breakpoint-based integration guide.

The following commands are exposed to the LLDB console command line, allowing you to control the Reveal Server during debugging:

reveal load

Loads the Reveal Server framework in the current debug session. If you’re debugging in the iOS or tvOS Simulator, this command will use the framework bundled with Reveal directly. When debugging on device, the command will look for RevealServer.framework package in your app’s resources. If you’ve followed the instructions in the Debugging on device section of the integration guide, your app will already contain that resource.

To start Reveal Server automatically after loading it, use the --autostart (or -a) flag, e.g. reveal load --autostart.

reveal start

Starts Reveal Server. Normally this happens automatically if the Server is loaded during application startup (e.g. in UIApplicationMain breakpoint), and also every time your app becomes active. However, if you would like to load and control Reveal Server manually, you can use this command to start it easily after you load it using reveal load command or by other means.

reveal stop

Stops Reveal Server, if it was previously started. You can restart it later using reveal start command.

reveal status

Prints the current status of Reveal Server — whether it’s loaded and running, and also its protocol version.

Getting Help

If you have any problems, questions or feedback about using Reveal Server LLDB commands with your app, head over to our support site and let us know.

Oliver Jones
Oliver Jones
Developer
by Itty Bitty Apps