Swift expression evaluator (LLDB): error while loading Swift module

Viewed 224

I have a target with mixed Swift and Objective-C code. I do the following:

  • I put a breakpoint on a line in a Swift file part of this target.
  • I run this target.
  • I type po $someVariableName in the debugger once it hits the breakpoint.

The debugger now shows a host of errors, ending with:

error: failed to import bridging header '/path/to/Bridging-Header.h'
Couldn't initialize Swift expression evaluator due to previous errors.

The output starts with:

Error while loading Swift module:
TARGET_NAME: /path/to/Bridging-Header.h:18:9: note: in file included from /path/to/Bridging-Header.h:18:

In between are a host of nullability annotation warnings and errors about unknown type names. Some errors come from bridging headers in the Carthage builds directory:

error: /path/to/project/Carthage/Build/iOS/Some.framework/Headers/Some-Swift.h

It seems as if whatever is executing after my po statement, lacks a few header imports or executes things in the wrong order. Any clue as to what could be wrong here?

I am using Xcode 11.4 (11E146)

0 Answers
Related