[swift-build-dev] Cannot debug SwiftPM package in Xcode

Ryan Lovelett swift-dev at ryan.lovelett.me
Fri Nov 11 13:08:42 CST 2016

I've been trying to debug a program that is packaged/built with SwiftPM.
Unfortunately, the Xcode project generated via `swift package
generate-xcodeproj` cannot inspect the variables. Whenever I try to
print an object from the lldb command-line in Xcode I get this error:

po r
warning: Swift error in module example.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module SourceKittenFramework.
Debug info from this module will be unavailable in the debugger.

error: in auto-import:
failed to get module 'example' from AST context:

I've narrowed it down to a specific dependency, SourceKittenFramework,
but I'm not sure if it is a bug in SwiftPM or in the package
configuration or something else completely.

I've attached a minimal SwiftPM package (`$ tar xvf
cannot-debug.tar.xz`) that should generate an Xcode project that
exemplifies the issue.

 Can someone please help me understand why this is not debuggable?

Thank you,

Ryan Lovelett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cannot-debug.tar.xz
Type: application/octet-stream
Size: 628 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20161111/0b54d8fe/attachment.obj>

More information about the swift-build-dev mailing list