سؤال

Normally I'm using LLDB from Xcode, but for some cases I would prefer using Terminal. I tried to type in "xcrun lldb" , and then I set lldb mode, but how do I set the right target?

هل كانت مفيدة؟

المحلول 2

From the Apple docs:

Specifying the Program to Debug

First, you need to set the program to debug. As with GDB, you can start LLDB and specify the file you want to debug using the command line. Type:

$ lldb /Projects/Sketch/build/Debug/Sketch.app Current executable set to '/Projects/Sketch/build/Debug/Sketch.app' (x86_64). Or you can specify the executable file to debug after it is already running using the file command:

$ lldb (lldb) file /Projects/Sketch/build/Debug/Sketch.app Current executable set to '/Projects/Sketch/build/Debug/Sketch.app' (x86_64).

A simple Google finds this.

نصائح أخرى

iOS Simulator

$ lldb
> process attach -n "AppName" -w

Then start app in iOS Simulator (ioslib can do this from command line). LLDB will connect once it discovers the app process.

iOS Device

Use ios-deploy (ios-deploy -d -W -b path/to/foo.app). It will launch and connect an LLDB session.

OSX App

process attach -n "AppName" in LLDB might work (not verified).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top