Skip to content

OUTLINE view shows "No symbols found in document" for Swift files in Xcode projects #1636

Closed
@tanachiu

Description

@tanachiu

Describe the bug
The OUTLINE view in VS Code displays "No symbols found in document" when opening
Swift files within an Xcode project.

  • This issue does not occur with Swift files outside of .xcodeproj contexts.
  • This issue started occurring in extension version 2.4.0, whereas version 2.2.0 worked as expected.
  • It's possible this is related to the Remote - SSH extension, but I haven't yet verified if
    the problem persists when running VS Code directly on the macOS machine.

To Reproduce
Steps to reproduce the behavior:

  1. On the remote macOS machine:
    a. Launch Xcode.
    b. Create a new iOS App project. (e.g., "MyTestApp")
    c. Build the app. (Product > Build)
  2. On the local Windows PC:
    a. Connect to the macOS machine via Remote -SSH.
    b. Open the Xcode project folder. (e.g., MyTestApp)
    c. Select ContentView.swift.
    d. Open the OUTLINE view in the EXPLORER sidebar.

Expected behavior
The OUTLINE view should display symbols present in ContentView.swift, such as ContentView and body.

Environment

  • OS:
    • Remote: macOS 15.5
    • Local: Windows 11 Pro 24H2 26100.4349 (local)
  • Swift version
    • swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
    • Target: arm64-apple-macosx15.0
  • Visual Studio Code version: 1.100.3
  • vscode-swift version: 2.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions