# How do I debug the compiler when the file needs to import a framework like SwiftUI?

**URL:** <https://forums.swift.org/t/how-do-i-debug-the-compiler-when-the-file-needs-to-import-a-framework-like-swiftui/40050>\
**Category:** Compiler\
**Created:** [September 5, 2020, 4:45pm UTC](https://forums.swift.org/t/how-do-i-debug-the-compiler-when-the-file-needs-to-import-a-framework-like-swiftui/40050 "2020-09-05T16:45:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vukrado](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/vukrado/32/12268_2.png) [@vukrado](https://forums.swift.org/u/vukrado)\
**Post date:** [September 5, 2020, 4:45pm UTC](https://forums.swift.org/t/how-do-i-debug-the-compiler-when-the-file-needs-to-import-a-framework-like-swiftui/40050/1 "2020-09-05T16:45:21Z")

</div>

Hi all,

When running this

`-dump-ast /Users/vuk/Desktop/main.swift`

My main.swift file has an `import SwiftUI` and I am getting an error "no such module 'SwiftUI'.

Do I need to pass in any special arguments when debugging something that depends on SwiftUI or any other framework?

Thanks!

---

<div class="post-metadata">

**Author:** ![typesanitizer](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/typesanitizer/32/8661_2.png) [@typesanitizer](https://forums.swift.org/u/typesanitizer)\
**Post date:** [September 5, 2020, 5:32pm UTC](https://forums.swift.org/t/how-do-i-debug-the-compiler-when-the-file-needs-to-import-a-framework-like-swiftui/40050/2 "2020-09-05T17:32:17Z")

</div>

SwiftUI is part of the SDK, but the compiler doesn't know about the SDK unless explicitly told about it.

```swift
xcrun -sdk macosx swiftc -dump-ast /Users/vuk/Desktop/main.swift

```

You can see the list of potential `-sdk` arguments with `xcodebuild -showsdks`.
