New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-3200] Cannot debug SwiftPM package in Xcode #5174
Comments
This looks like an issue with swift importing C modules. Debugger has that error when umbrella dir is used in modulemap i.e. In the attached package, changing module See {
umbrella "." // <---
link "See"
export *
} to module See {
header "header.h"
link "See"
export *
} resolves the issue. How to reproduce? error: in auto-import: Changing the modulemap to use header instead of umbrella dir (and clean build) fixes the issue. |
/cc jingham@apple.com (JIRA User) |
Comment by Ryan Lovelett (JIRA) I've experienced this with yet another configuration. Using Yams at tag 0.1.4 or commit b64e0a230dc3c4f82cac1c8c46ae3def602131f6. If you attempt to debug a simple program, e.g., import Yams
let node = try Node(string: "- 1: test")
print(node) LLDB errors with: (lldb) po node
warning: Swift error in module sample.
Debug info from this module will be unavailable in the debugger.
warning: Swift error in module Yams.
Debug info from this module will be unavailable in the debugger.
error: in auto-import:
failed to get module 'sample' from AST context:
(lldb) |
I can't reproduce it anymore. The generated framework targets in the Xcode project were kind of broken which was fixed by SR-3121 so it was probably related to that. |
Attachment: Download
Additional Detail from JIRA
md5: 6620695d87d14b9eaaa0a570821ed129
duplicates:
Issue Description:
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: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.The text was updated successfully, but these errors were encountered: