nutritionfactsorg/daily-dozen-ios

Xcode debugger doesn't pause at breakpoints (simulator iOS 15, 16)

Opened this issue · 0 comments

Xcode versions 15.1 and 15.2 were found to not pause at breakpoints for iOS 15 and iOS 16 when debugging the Daily Dozen app while using the Simulator.

Some fault isolation and internet searching confirmed that the issue was with Apple Development tools (see links below), and not issue in the Daily Dozen build/debug process.

A successful workaround has been implemented for the DailyDozen build/debug process. Here are the steps:

  1. A pause() instruction is automatically executed for iOS15/iOS16 simulator builds after app launch.
  2. Manually Detach from DailyDozen process via the debugger.
  3. Copy the "logit file path" from the debugger console.
    • The logit log file will be required to view subsequent debugging output.
  4. Open the logit text file e.g. bbedit /Users/…/20240204_235757_log_dev.txt.
  5. Make a copy of any other useful debug console information because the re-attach will clear the debug console.
  6. Manually Attach to Process > DailyDozen via the debugger.
    • breakpoints and lldb prompt will work at this point.
    • however, for reasons unknown, the debug re-attach is clearing the console and Swift print() statements are no longer producing console output.

Notes:

  • Breakpoints before pauseDebug() are not reachable in the the iOS 15/16 + Simulator scenario.
  • Two pause() statements are used to enable the detach/attach steps.
  • Currently, Swift print() statements stop printing to the debug console after the detach/attach steps.

Resources: