05-10-2021

Question or issue on macOS:

You may connect a real device to your Mac using a cable, or for iOS or tvOS apps, connect it over WiFi after you pair it with Xcode. For macOS apps, choose a scheme, then click the Run button in the toolbar. You can also run SwiftUI apps in the simulator or on a device using the controls in the preview. Microsoft Flight Simulator Mac OS X will give you the chance to enjoy 20 planes and 30 real airports from all around the world. Because you will get the Premium Deluxe Edition, the following are included.

Is it possible to use GDB or LLDB from the Terminal command-line under Mac OS X to debug apps running on the iOS Simulator? (e.g. not from within Xcode’s GUI or console, but using an external command-line or process). If so, how?

Macos Ios Simulator

How to solve this problem?

You’ll need to have the app already in the simulator’s Springboard; you can’t launch the app in the simulator from Xcode and then expect to be able to have a command line instance of gdb attach to it.

Ios Simulator Web

So:

Simulator

Macos Ios Simulator Download

  1. Run the iOS Simulator, having already gotten your app into it.
  2. In a terminal window:
Screenshot
  1. Launch your app from the simulator Springboard.
  2. gdb should attach to the process beforemain() is executed. So you can set some breakpoints, or whatever. Then:
Macos Ios Simulator

The procedure for lldb is similar:

I am not sure why you’d want or need to do this, but as an old command line gdb (and dbx) guy, I can appreciate it. 🙂

Ios Simulator On Macos

Hope this helps!